update web ui for mainnet
This commit is contained in:
parent
8735b587cb
commit
075658922f
|
@ -39,8 +39,8 @@ function App() {
|
|||
<Layout style={{height: '100%'}}>
|
||||
<Router>
|
||||
<Header style={{position: 'fixed', zIndex: 1, width: '100%'}}>
|
||||
<Link to="/assistant" style={{paddingRight: 20}}>Assistant</Link>
|
||||
<Link to="/" style={{paddingRight: 20}}>Ethereum</Link>
|
||||
<Link to="/" style={{paddingRight: 20}}>Assistant</Link>
|
||||
<Link to="/eth" style={{paddingRight: 20}}>Ethereum</Link>
|
||||
<Link to="/solana">Solana</Link>
|
||||
{
|
||||
connected ? (<a style={{float: "right"}}>
|
||||
|
@ -63,13 +63,13 @@ function App() {
|
|||
<BridgeProvider>
|
||||
<SolanaTokenProvider>
|
||||
<Switch>
|
||||
<Route path="/assistant">
|
||||
<Route path="/">
|
||||
<Assistant/>
|
||||
</Route>
|
||||
<Route path="/solana">
|
||||
<TransferSolana/>
|
||||
</Route>
|
||||
<Route path="/">
|
||||
<Route path="/eth">
|
||||
<Transfer/>
|
||||
</Route>
|
||||
</Switch>
|
||||
|
@ -84,7 +84,7 @@ function App() {
|
|||
|
||||
</div>
|
||||
</Content>
|
||||
<Footer style={{textAlign: 'center'}}>nexantic GmbH 2020</Footer>
|
||||
<Footer style={{textAlign: 'center'}}>The Wormhole Project</Footer>
|
||||
</Router>
|
||||
</Layout>
|
||||
</div>
|
||||
|
|
|
@ -70,11 +70,12 @@ async function createWrapped(c: Connection, b: SolanaBridge, wallet: Wallet, met
|
|||
let tx = new Transaction();
|
||||
|
||||
// @ts-ignore
|
||||
let [ix_account, newSigner] = await b.createWrappedAssetAndAccountInstructions(key.publicKey, mint, meta);
|
||||
let [ix_account, newSigner] = await b.createWrappedAssetAndAccountInstructions(wallet.publicKey, mint, meta);
|
||||
let recentHash = await c.getRecentBlockhash();
|
||||
tx.recentBlockhash = recentHash.blockhash
|
||||
tx.add(...ix_account)
|
||||
tx.feePayer = wallet.publicKey;
|
||||
tx.sign(newSigner);
|
||||
let signed = await wallet.signTransaction(tx);
|
||||
message.loading({content: "Waiting for transaction to be confirmed...", key: "tx", duration: 1000})
|
||||
await c.sendRawTransaction(signed.serialize(), {preflightCommitment: "single"})
|
||||
|
@ -240,7 +241,7 @@ export default function TransferInitiator(params: TransferInitiatorParams) {
|
|||
<Form.Item label="Amount" name="layout"
|
||||
validateStatus={amountValid ? "success" : "error"}>
|
||||
<Input type={"number"} placeholder={"Amount"}
|
||||
addonAfter={`Balance: ${coinInfo.balance.div(new BigNumber(10).pow(coinInfo.decimals))}`}
|
||||
addonAfter={`Balance: ${new BN(coinInfo.balance.toString()).div(new BN(10).pow(coinInfo.decimals))}`}
|
||||
onChange={(v) => {
|
||||
if (v.target.value === "") {
|
||||
setAmount(new BigNumber(0));
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import {PublicKey} from "@solana/web3.js";
|
||||
|
||||
const BRIDGE_ADDRESS = "0xdae0Cba01eFc4bfEc1F7Fece73Fe8b8d2Eda65B0";
|
||||
const WRAPPED_MASTER = "9f7bedd9ef2d57eccab2cb56a5bd395edbb77df8"
|
||||
const BRIDGE_ADDRESS = "0xf92cD566Ea4864356C5491c177A430C222d7e678";
|
||||
const WRAPPED_MASTER = "9A5e27995309a03f8B583feBdE7eF289FcCdC6Ae"
|
||||
|
||||
|
||||
const SOLANA_BRIDGE_PROGRAM = new PublicKey("BrdgiFmZN3BKkcY3danbPYyxPKwb8RhQzpM2VY5L97ED");
|
||||
const SOLANA_BRIDGE_PROGRAM = new PublicKey("WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC");
|
||||
const TOKEN_PROGRAM = new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
|
||||
|
||||
const SOLANA_HOST = "https://testnet.solana.com";
|
||||
const SOLANA_HOST = "https://solana-api.projectserum.com";
|
||||
|
||||
export {
|
||||
BRIDGE_ADDRESS,
|
||||
|
|
|
@ -242,13 +242,13 @@ function Assistant() {
|
|||
let startBlock = provider.blockNumber;
|
||||
let completed = false;
|
||||
let blockHandler = (blockNumber: number) => {
|
||||
if (blockNumber - startBlock < 5) {
|
||||
if (blockNumber - startBlock < 15) {
|
||||
setLoading({
|
||||
loading: true,
|
||||
message: "Awaiting ETH confirmations",
|
||||
progress: {
|
||||
completion: (blockNumber - startBlock) / 5 * 100,
|
||||
content: `${blockNumber - startBlock}/${5}`
|
||||
completion: (blockNumber - startBlock) / 15 * 100,
|
||||
content: `${blockNumber - startBlock}/${15}`
|
||||
}
|
||||
})
|
||||
} else if (!completed) {
|
||||
|
@ -284,7 +284,7 @@ function Assistant() {
|
|||
}
|
||||
})
|
||||
} else {
|
||||
setLoading({loading: true, message: "Awaiting guardians (TODO ping)"})
|
||||
setLoading({loading: true, message: "Awaiting guardian confirmation"})
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue