Skip to content

Commit

Permalink
try cI build & deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Apr 15, 2024
1 parent 7288c05 commit 093e880
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 13 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Deploy
on:
push:
branches: [ master ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install
- run: pnpm install

- name: Build
run: |
pnpm build
cp ./config/CNAME ./dist/CNAME
- name: Deploy 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./dist
1 change: 1 addition & 0 deletions config/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dapp.encointer.org
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@paraspell/playground",
"name": "@encointer/dapp",
"private": true,
"version": "1.0.0",
"type": "module",
Expand Down
6 changes: 3 additions & 3 deletions src/components/TransferForm.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useForm } from '@mantine/form';
import { isValidWalletAddress } from '../utils';
import { FC } from 'react';
import { Button, Checkbox, Select, Stack, TextInput } from '@mantine/core';
import { NODES_WITH_RELAY_CHAINS, TNodeWithRelayChains } from '@paraspell/sdk';
import { Button, Stack, TextInput } from '@mantine/core';
import { TNodeWithRelayChains } from '@paraspell/sdk';
import {useWallet} from "../providers/WalletProvider.tsx";

export type FormValues = {
Expand All @@ -27,7 +27,7 @@ const TransferForm: FC<Props> = ({ onSubmit, loading }) => {
to: 'Kusama',
currency: 'KSM',
amount: '0.2',
address: selectedAccount?.address,
address: selectedAccount? selectedAccount.address : '',
useApi: false,
},

Expand Down
6 changes: 3 additions & 3 deletions src/components/XcmTransfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ const XcmTransfer = () => {
if (from === "Polkadot" || from === "Kusama") {
return Builder(api)
.to(to as TNode)
.amount(amount * Math.pow(10,12))
.amount(Number(amount) * Math.pow(10,12))
.address(address)
.build();
} else if (to === "Polkadot" || to === "Kusama") {
return Builder(api)
.from(from as TNode)
.amount(amount* Math.pow(10,12))
.amount(Number(amount) * Math.pow(10,12))
.address(address)
.build();
} else {
return Builder(api)
.from(from)
.to(to)
.currency(currency)
.amount(amount * Math.pow(10,12))
.amount(Number(amount) * Math.pow(10,12))
.address(address)
.build();
}
Expand Down
6 changes: 0 additions & 6 deletions src/routes/XcmSdkSandbox.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { Container, Tabs, rem } from "@mantine/core";
import {
IconArrowsUpDown,
IconBoxAlignBottomRight,
IconCoins,
IconSend,
} from "@tabler/icons-react";
import XcmTransfer from "../components/XcmTransfer";
import AssetsQueries from "../components/assets/AssetsQueries";
import PalletsQueries from "../components/pallets/PalletsQueries";
import ChannelsQueries from "../components/channels/ChannelsQueries";

const XcmSdkSandbox = () => {
const iconStyle = { width: rem(12), height: rem(12) };
Expand Down

0 comments on commit 093e880

Please sign in to comment.