Skip to content

Commit

Permalink
fix: XLM to native
Browse files Browse the repository at this point in the history
  • Loading branch information
chopan123 committed Aug 1, 2024
1 parent e1504dc commit c9e2573
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/helpers/horizon/createHorizonTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ export const createStellarPathPayment = async (trade: InterfaceTrade, allowedSli
const account = await serverHorizon?.loadAccount(address!);
const path = trade.path?.map((asset) => {
const assetParts = asset.split(":")
if (assetParts.length == 1 && assetParts[0] == "XLM") {
console.log('🚀 ~ path ~ assetParts:', assetParts);
if (assetParts.length == 1 && assetParts[0] == "native") {
console.log('🚀 ~ path ~ assetParts native:', assetParts);

return Asset.native()
}
console.log('🚀 ~ path ~ assetParts no native:', assetParts);

return new Asset(assetParts[0], assetParts[1])
})

Expand Down

0 comments on commit c9e2573

Please sign in to comment.