@stellar-expert/ui-framework 1.9.9 → 1.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-expert/ui-framework",
3
- "version": "1.9.9",
3
+ "version": "1.9.10",
4
4
  "description": "StellarExpert shared UI components library",
5
5
  "main": "index.js",
6
6
  "module": "./index.js",
@@ -6,8 +6,11 @@ const manageOfferOpTypes = ['manageSellOffer', 'manageBuyOffer', 'createPassiveS
6
6
  * @return {[{amount: *, source, type: string, asset},{amount: *, source, type: string, asset}]|{length}|*|*[]}
7
7
  */
8
8
  export function retrieveOpBalanceChanges(op) {
9
+ const account = op.tx?.context?.account
10
+ if (typeof account!=='string')
11
+ return []
9
12
  const {effects} = op.operation
10
- const changes = effects.filter(e => e.source === op.context && (e.type === 'accountDebited' || e.type === 'accountCredited'))
13
+ const changes = effects.filter(e => e.source === account && (e.type === 'accountDebited' || e.type === 'accountCredited'))
11
14
  if (changes.length) {
12
15
  changes.sort((a, b) => a.type - b.type)
13
16
  return changes