-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWhProvider.jsx
43 lines (40 loc) · 990 Bytes
/
WhProvider.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { useState } from 'react';
import {
IUnsignedTx,
WhProvider,
WhTransferModal,
} from '@zktx.io/wormhole-kit';
const App = () => {
const [address, setAddress] = useState<string | undefined>(undefined);
const [open, setOpen] = useState<boolean>(false);
const handleUnsignedTxs = async (unsignedTxs: IUnsignedTx[]): Promise<void> => {
// To execute transactions,
// send the unsigned transaction to the wallet.
};
return (
<WhProvider
network= "Testnet"
chains = { ['Sui', 'Sepolia', 'Solana', 'Aptos', 'Celo', 'Polygon']}
config = {
{
chains: {
Ethereum: {
rpc: 'https://eth-goerli.public.blastapi.io',
},
Polygon: {
rpc: 'https://polygon-mumbai.api.onfinality.io/public',
},
},
}
}
mode = "dark"
>
<WhTransferModal
chain="Sui"
address = { address }
trigger = {< button > Transfer </button>}
handleUnsignedTxs = { handleUnsignedTxs }
/>
</ WhProvider>
)
}