From 36ef5e07d23501758416b2ff35a690fa222c58a4 Mon Sep 17 00:00:00 2001 From: Aaron Choo Date: Fri, 21 Jun 2024 12:39:11 +0900 Subject: [PATCH] fix: add default sign options to wallet connect sign funcs (#73) This PR adds the `preferNoSetFee` and `preferNoSetMemo` options hardcoded to `true` to the `WalletConnectV2` class. See #61 for the relevant issue. If tested to be working, this PR should take precedence over #71 as this implementation is much simpler. - Closes #61 - Closes #71 --- src/wallet/walletconnect/WalletConnectV2.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wallet/walletconnect/WalletConnectV2.ts b/src/wallet/walletconnect/WalletConnectV2.ts index bdcdb636..8a429886 100644 --- a/src/wallet/walletconnect/WalletConnectV2.ts +++ b/src/wallet/walletconnect/WalletConnectV2.ts @@ -56,6 +56,11 @@ const Event = { } as const; type Event = (typeof Event)[keyof typeof Event]; +const DEFAULT_SIGN_OPTIONS = { + preferNoSetFee: true, + preferNoSetMemo: true, +}; + export class WalletConnectV2 { private readonly projectId: string; private readonly mobileAppDetails: MobileAppDetails; @@ -191,6 +196,7 @@ export class WalletConnectV2 { { signerAddress, signDoc: stdSignDoc, + signOptions: DEFAULT_SIGN_OPTIONS, } ); return { @@ -210,6 +216,7 @@ export class WalletConnectV2 { { signerAddress, signDoc, + signOptions: DEFAULT_SIGN_OPTIONS, } ); return {