From 846ef4fbf52f4e379e75921992c9ef0168849c48 Mon Sep 17 00:00:00 2001 From: cpl121 <100352899+cpl121@users.noreply.github.com> Date: Mon, 13 May 2024 12:39:38 +0200 Subject: [PATCH] fix: issuer id in transaction options (#8516) --- .../lib/core/wallet/utils/getAccountTransactionOptions.ts | 1 + .../lib/core/wallet/utils/getDefaultTransactionOptions.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/shared/lib/core/wallet/utils/getAccountTransactionOptions.ts b/packages/shared/lib/core/wallet/utils/getAccountTransactionOptions.ts index f01ac322693..cc2ae8f6924 100644 --- a/packages/shared/lib/core/wallet/utils/getAccountTransactionOptions.ts +++ b/packages/shared/lib/core/wallet/utils/getAccountTransactionOptions.ts @@ -13,5 +13,6 @@ export function getAccountTransactionOptions( value: new AccountAddress(accountId), }, allowMicroAmount: true, + issuerId: accountId, } } diff --git a/packages/shared/lib/core/wallet/utils/getDefaultTransactionOptions.ts b/packages/shared/lib/core/wallet/utils/getDefaultTransactionOptions.ts index 39b919f0fc3..e6975752a33 100644 --- a/packages/shared/lib/core/wallet/utils/getDefaultTransactionOptions.ts +++ b/packages/shared/lib/core/wallet/utils/getDefaultTransactionOptions.ts @@ -1,6 +1,10 @@ import { TransactionOptions } from '@iota/sdk/out/types' +import { getSelectedWallet } from '../stores' -export function getDefaultTransactionOptions(): TransactionOptions { +export function getDefaultTransactionOptions( + accountId: string | undefined = getSelectedWallet()?.mainAccountId +): TransactionOptions | undefined { + if (!accountId) return return { remainderValueStrategy: { /** The name of the strategy. */ @@ -9,5 +13,6 @@ export function getDefaultTransactionOptions(): TransactionOptions { value: null, }, allowMicroAmount: true, + issuerId: accountId, } }