Skip to content

Commit

Permalink
Fix XLM crash when swapping (Demo 0) (#6127)
Browse files Browse the repository at this point in the history
* bugfix: cant-swap-XLM

* chore: added changeset

* Update .changeset/serious-goats-dream.md

Co-authored-by: Quentin Jaccarino <quentin.jaccarino@ledger.fr>

---------

Co-authored-by: Quentin Jaccarino <quentin.jaccarino@ledger.fr>
  • Loading branch information
CremaFR and Justkant authored Feb 9, 2024
1 parent c57f16f commit 43e5a09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/serious-goats-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-common": patch
---

fixed XLM crash
3 changes: 2 additions & 1 deletion libs/ledger-live-common/src/wallet-api/Exchange/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ export const handlers = ({
* 'subAccountId' is used for ETH and it's ERC-20 tokens.
* This field is ignored for BTC
*/
const subAccountId = fromParentAccount ? fromAccount.id : undefined;
const subAccountId =
fromParentAccount && fromParentAccount.id !== fromAccount.id ? fromAccount.id : undefined;

const bridgeTx = accountBridge.createTransaction(mainFromAccount);
/**
Expand Down

0 comments on commit 43e5a09

Please sign in to comment.