Update js sdk transfer from solana
Change-Id: I1e81e5c068e00a2c02fea74df6c21603d44b9d74
This commit is contained in:
parent
08b4e8c7b3
commit
fe2b0d4d07
|
@ -272,7 +272,8 @@ export async function transferFromSolana(
|
|||
targetAddress: Uint8Array,
|
||||
targetChain: ChainId,
|
||||
originAddress?: Uint8Array,
|
||||
originChain?: ChainId
|
||||
originChain?: ChainId,
|
||||
fromOwnerAddress?: string
|
||||
) {
|
||||
const nonce = createNonce().readUInt32LE(0);
|
||||
const fee = BigInt(0); // for now, this won't do anything, we may add later
|
||||
|
@ -290,7 +291,7 @@ export async function transferFromSolana(
|
|||
TOKEN_PROGRAM_ID,
|
||||
new PublicKey(fromAddress),
|
||||
new PublicKey(approval_authority_address(tokenBridgeAddress)),
|
||||
new PublicKey(payerAddress),
|
||||
new PublicKey(fromOwnerAddress || payerAddress),
|
||||
[],
|
||||
new u64(amount.toString(16), 16)
|
||||
);
|
||||
|
@ -321,7 +322,7 @@ export async function transferFromSolana(
|
|||
payerAddress,
|
||||
messageKey.publicKey.toString(),
|
||||
fromAddress,
|
||||
payerAddress,
|
||||
fromOwnerAddress || payerAddress,
|
||||
originChain as number, // checked by isSolanaNative
|
||||
originAddress as Uint8Array, // checked by throw
|
||||
nonce,
|
||||
|
|
Loading…
Reference in New Issue