From f6e9536f13a15c6acade8bbf993a24096d728858 Mon Sep 17 00:00:00 2001 From: Mullapudi Pruthvik Date: Fri, 30 Aug 2024 17:35:13 +0530 Subject: [PATCH] chore(sdk-coin-polygon): use nonpacked encoding for v4 wallet Ticket: COIN-1404 TICKET: COIN-1404 --- modules/abstract-eth/src/lib/transactionBuilder.ts | 2 +- modules/sdk-coin-polygon/src/lib/transactionBuilder.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/abstract-eth/src/lib/transactionBuilder.ts b/modules/abstract-eth/src/lib/transactionBuilder.ts index d59a256932..24a8110b2a 100644 --- a/modules/abstract-eth/src/lib/transactionBuilder.ts +++ b/modules/abstract-eth/src/lib/transactionBuilder.ts @@ -64,7 +64,7 @@ export abstract class TransactionBuilder extends BaseTransactionBuilder { // Wallet initialization transaction parameters private _walletOwnerAddresses: string[]; - private _walletVersion: number; + protected _walletVersion: number; // flush tokens parameters private _forwarderAddress: string; diff --git a/modules/sdk-coin-polygon/src/lib/transactionBuilder.ts b/modules/sdk-coin-polygon/src/lib/transactionBuilder.ts index d0b7e3c73f..e2b76d1c1f 100644 --- a/modules/sdk-coin-polygon/src/lib/transactionBuilder.ts +++ b/modules/sdk-coin-polygon/src/lib/transactionBuilder.ts @@ -31,6 +31,6 @@ export class TransactionBuilder extends EthLikeTransactionBuilder { public coinUsesNonPackedEncodingForTxData(): boolean { // This is because the contracts which have been deployed for // polygon amoy testnet use non-packed encoding for tx data - return this._common.chainIdBN().toString() === '80002'; + return this._common.chainIdBN().toString() === '80002' || this._walletVersion === 4; } }