Skip to content

Commit

Permalink
[LIVE-12913] Bugfix - Dirty fix Tron synchronization not always havin…
Browse files Browse the repository at this point in the history
…g `tronResources` (#7035)

* Add optional chaining to access
`cacheTransactionInfoById` as `tronResources` are still unstable

* changeset
  • Loading branch information
lambertkevin committed Jun 7, 2024
1 parent 2f2b754 commit 4297d2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/friendly-frogs-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-common": patch
---

Add optional chaining to `tronResources.cacheTransactionInfoById` since resources are still unstable which prevents account migration
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const getAccountShape: GetAccountShape<TronAccount> = async (
const spendableBalance = acc.balance ? new BigNumber(acc.balance) : new BigNumber(0);
const cacheTransactionInfoById = initialAccount
? {
...(initialAccount.tronResources.cacheTransactionInfoById || {}),
...(initialAccount?.tronResources?.cacheTransactionInfoById || {}),
}
: {};
const operationsPageSize = Math.min(
Expand Down

0 comments on commit 4297d2c

Please sign in to comment.