Skip to content

Commit

Permalink
fix(sdk): Fix Astar and Shiden native asset transfers 🪲
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldev5 authored and dudo50 committed Aug 13, 2024
1 parent 566fac3 commit da13fd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/sdk/src/pallets/assets/assetsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ const findAssetBySymbol = (
({ symbol: assetSymbol }) => assetSymbol?.toLowerCase() === symbol.toLowerCase()
)

if (otherAssetsMatches.length > 1 && !isRelayDestination && isSymbol === undefined) {
throw new DuplicateAssetError(symbol)
}

if (node === 'Astar' || node === 'Shiden') {
return nativeAssetsMatches[0] || otherAssetsMatches[0] || null
}

if (otherAssetsMatches.length > 1 && !isRelayDestination && isSymbol === undefined) {
throw new DuplicateAssetError(symbol)
}

return otherAssetsMatches[0] || nativeAssetsMatches[0] || null
}

Expand Down

0 comments on commit da13fd2

Please sign in to comment.