Skip to content

Commit

Permalink
Merge pull request #39 from interlay/tom/usdt-transfer-fee-change
Browse files Browse the repository at this point in the history
wip: change fee currency
  • Loading branch information
tomjeatt authored Jan 20, 2023
2 parents 9a53b42 + d64aebb commit 5d346b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interlay/bridge",
"version": "0.1.13",
"version": "0.1.14",
"description": "polkawallet bridge sdk",
"main": "build/index.js",
"typings": "build/index.d.ts",
Expand Down
23 changes: 2 additions & 21 deletions src/adapters/interlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const interlayRoutersConfig: Omit<CrossChainRouterConfigs, "from">[] = [
to: "statemint",
token: "USDT",
xcm: {
fee: { token: "DOT", amount: "1000000000" },
fee: { token: "USDT", amount: "1000000" },
weightLimit: DEST_WEIGHT,
},
},
Expand All @@ -51,7 +51,7 @@ export const kintsugiRoutersConfig: Omit<CrossChainRouterConfigs, "from">[] = [
to: "statemine",
token: "USDT",
xcm: {
fee: { token: "KSM", amount: "1500000000" },
fee: { token: "USDT", amount: "10000" },
weightLimit: DEST_WEIGHT,
},
},
Expand Down Expand Up @@ -241,25 +241,6 @@ class BaseInterlayAdapter extends BaseCrossChainAdapter {
};
}

if (
isChainEqual(toChain, "statemine") ||
isChainEqual(toChain, "statemint")
) {
const destFee = this.getCrossChainFee(token, to);
const destWeight = this.getDestWeight(token, to);

// do the needful, use multi currencies
return this.api.tx.xTokens.transferMulticurrencies(
[
[tokenId, amount.toChainData()],
[{ Token: destFee.token }, destFee.balance.toChainData()],
],
1,
{ V1: dst },
destWeight?.toString()
);
}

return this.api.tx.xTokens.transfer(
tokenId,
amount.toChainData(),
Expand Down

0 comments on commit 5d346b2

Please sign in to comment.