From 25c402f47fe2d89078ce32b06125d3cec565c284 Mon Sep 17 00:00:00 2001 From: Dusan Brajovic Date: Thu, 20 Jun 2024 17:17:48 +0200 Subject: [PATCH] wallet ts debug prints --- .../src/broadcaster/MsgBroadcaster.ts | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/packages/wallet-ts/src/broadcaster/MsgBroadcaster.ts b/packages/wallet-ts/src/broadcaster/MsgBroadcaster.ts index b94bee3d7..9c6cb0fe9 100644 --- a/packages/wallet-ts/src/broadcaster/MsgBroadcaster.ts +++ b/packages/wallet-ts/src/broadcaster/MsgBroadcaster.ts @@ -297,6 +297,9 @@ export class MsgBroadcaster { JSON.stringify(eip712TypedData), tx.ethereumAddress, ) + + console.log(JSON.stringify(eip712TypedData)) + const pubKeyOrSignatureDerivedPubKey = getEthereumWalletPubKey({ pubKey: baseAccount.pubKey?.key, eip712TypedData, @@ -304,6 +307,23 @@ export class MsgBroadcaster { }) /** Preparing the transaction for client broadcasting */ + console.log({ + eip712TypedData, + signature, + txPayload: { + message: msgs, + memo: tx.memo, + signMode: SIGN_EIP712_V2, + fee: stdFee, + pubKey: pubKeyOrSignatureDerivedPubKey, + sequence: baseAccount.sequence, + timeoutHeight: timeoutHeight.toNumber(), + accountNumber: baseAccount.accountNumber, + chainId, + }, + }) + + const { txRaw } = createTransaction({ message: msgs, memo: tx.memo, @@ -324,6 +344,8 @@ export class MsgBroadcaster { /** Append Signatures */ txRawEip712.signatures = [hexToBuff(signature)] + console.log("signature:", hexToBuff(signature)) + return walletStrategy.sendTransaction(txRawEip712, { chainId, endpoints, @@ -408,6 +430,9 @@ export class MsgBroadcaster { JSON.stringify(eip712TypedData), tx.ethereumAddress, ) + + console.log(JSON.stringify(eip712TypedData)) + const pubKeyOrSignatureDerivedPubKey = getEthereumWalletPubKey({ pubKey: baseAccount.pubKey?.key, eip712TypedData, @@ -415,6 +440,22 @@ export class MsgBroadcaster { }) /** Preparing the transaction for client broadcasting */ + console.log({ + eip712TypedData, + signature, + txPayload: { + message: msgs, + memo: tx.memo, + signMode: SIGN_EIP712_V2, + fee: stdFee, + pubKey: pubKeyOrSignatureDerivedPubKey, + sequence: baseAccount.sequence, + timeoutHeight: timeoutHeight.toNumber(), + accountNumber: baseAccount.accountNumber, + chainId, + }, + }) + const { txRaw } = createTransaction({ message: msgs, memo: tx.memo, @@ -435,6 +476,8 @@ export class MsgBroadcaster { /** Append Signatures */ txRawEip712.signatures = [hexToBuff(signature)] + console.log("signature:", hexToBuff(signature)) + return walletStrategy.sendTransaction(txRawEip712, { chainId, endpoints,