diff --git a/apps/ledger-live-desktop/static/i18n/en/app.json b/apps/ledger-live-desktop/static/i18n/en/app.json index 896028a98c50..12fbd5ecae47 100644 --- a/apps/ledger-live-desktop/static/i18n/en/app.json +++ b/apps/ledger-live-desktop/static/i18n/en/app.json @@ -5773,7 +5773,7 @@ "title": "Account will be funded" }, "SolanaTokenAccountFrozen": { - "title": "Account assets are frozen" + "title": "Token account assets are frozen" }, "SolanaTokenAccounNotInitialized": { "title": "Account not initialized" diff --git a/apps/ledger-live-mobile/src/locales/en/common.json b/apps/ledger-live-mobile/src/locales/en/common.json index 8d732ef56c0c..c3d4e35b584b 100644 --- a/apps/ledger-live-mobile/src/locales/en/common.json +++ b/apps/ledger-live-mobile/src/locales/en/common.json @@ -756,6 +756,9 @@ "SolanaAssociatedTokenAccountWillBeFunded": { "title": "Account will be funded" }, + "SolanaTokenAccountFrozen": { + "title": "Token account assets are frozen" + }, "SolanaAddressOfEd25519": { "title": "Address off ed25519 curve" }, diff --git a/libs/ledger-live-common/src/families/solana/js-prepareTransaction.ts b/libs/ledger-live-common/src/families/solana/js-prepareTransaction.ts index 548e868cd57a..6dabc87c4a93 100644 --- a/libs/ledger-live-common/src/families/solana/js-prepareTransaction.ts +++ b/libs/ledger-live-common/src/families/solana/js-prepareTransaction.ts @@ -238,6 +238,17 @@ async function getTokenRecipient( api, )); + if (!shouldCreateAsAssociatedTokenAccount) { + const associatedTokenAccount = await getMaybeTokenAccount( + recipientAssociatedTokenAccountAddress, + api, + ); + if (associatedTokenAccount instanceof Error) throw recipientTokenAccount; + if (associatedTokenAccount?.state === "frozen") { + return new SolanaTokenAccountFrozen(); + } + } + return { walletAddress: recipientAddress, shouldCreateAsAssociatedTokenAccount,