From 52f8c5d82c960ff3e7b8df782d6931cb5e89a69d Mon Sep 17 00:00:00 2001 From: Ilja Date: Tue, 15 Mar 2022 14:31:10 +0200 Subject: [PATCH] Fis solana signTransaction --- wallets/react-wallet-v2/src/lib/SolanaLib.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wallets/react-wallet-v2/src/lib/SolanaLib.ts b/wallets/react-wallet-v2/src/lib/SolanaLib.ts index 9abc514..ce999aa 100644 --- a/wallets/react-wallet-v2/src/lib/SolanaLib.ts +++ b/wallets/react-wallet-v2/src/lib/SolanaLib.ts @@ -58,8 +58,12 @@ export default class SolanaLib { await tx.sign(this.keypair) - const { signature } = tx.signatures[tx.signatures.length - 1] + if (!tx.signature) { + throw new Error('Missing signature!') + } - return { signature } + const bs58Signature = bs58.encode(tx.signature) + + return { signature: bs58Signature } } }