mirror of https://github.com/certusone/oyster.git
feat: transfer
This commit is contained in:
parent
a9fc4dbf8d
commit
b0ae8b4c88
|
@ -95,6 +95,8 @@ export const Transfer = () => {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
if(request.from === ASSET_CHAIN.Solana) {
|
||||
const bridgeAddress = programIds().wormhole.bridge;
|
||||
|
||||
let signer = provider.getSigner();
|
||||
|
@ -139,6 +141,22 @@ export const Transfer = () => {
|
|||
asset,
|
||||
info,
|
||||
});
|
||||
} else {
|
||||
console.log(asset);
|
||||
// let info = {
|
||||
// address: fromAddress,
|
||||
// name: "",
|
||||
// balance: acc.balance,
|
||||
// allowance: 0,
|
||||
// decimals: acc.assetMeta.decimals,
|
||||
// isWrapped: acc.assetMeta.chain != ChainID.SOLANA,
|
||||
// chainID: acc.assetMeta.chain,
|
||||
// assetAddress: acc.assetMeta.address,
|
||||
|
||||
// // Solana specific
|
||||
// mint: acc.mint,
|
||||
// };
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e.toString());
|
||||
notify({
|
||||
|
|
|
@ -17,7 +17,7 @@ const WormholeCanvas = ({
|
|||
rotate?: boolean;
|
||||
}) => {
|
||||
return (
|
||||
<Canvas onCreated={onCreated}>
|
||||
<Canvas onCreated={onCreated} style={{ opacity: 0.4 }}>
|
||||
<Camera />
|
||||
<React.Suspense fallback={null}>
|
||||
<WormholeGeometry rotate={rotate}/>
|
||||
|
|
|
@ -15,15 +15,8 @@ import { ASSET_CHAIN } from '../../../utils/assets';
|
|||
import { BigNumber } from 'ethers/utils';
|
||||
import { Erc20Factory } from '../../../contracts/Erc20Factory';
|
||||
import { WormholeFactory } from '../../../contracts/WormholeFactory';
|
||||
import { AssetMeta, createWrappedAssetInstruction } from './../meta';
|
||||
import { bridgeAuthorityKey, wrappedAssetMintKey } from './../helpers';
|
||||
import {
|
||||
Account,
|
||||
Connection,
|
||||
PublicKey,
|
||||
SystemProgram,
|
||||
TransactionInstruction,
|
||||
} from '@solana/web3.js';
|
||||
import { bridgeAuthorityKey } from './../helpers';
|
||||
import { Connection, PublicKey, SystemProgram } from '@solana/web3.js';
|
||||
import { Token } from '@solana/spl-token';
|
||||
import { ProgressUpdate, TransferRequest } from './interface';
|
||||
import BN from 'bn.js';
|
||||
|
|
Loading…
Reference in New Issue