Skip to content

Commit

Permalink
update phala (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwer951123 authored Jun 6, 2023
1 parent 611b78d commit fe31230
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkawallet/bridge",
"version": "0.0.8-2",
"version": "0.0.8-3",
"description": "polkawallet bridge sdk",
"main": "index.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -47,5 +47,5 @@
"jest": "^28.1.1",
"typescript": "^4.7.4"
},
"stableVersion": "0.0.8-1"
"stableVersion": "0.0.8-2"
}
13 changes: 2 additions & 11 deletions src/adapters/phala.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,26 @@ import {
} from "../types";
import { validateAddress } from "../utils";

const DEST_WEIGHT = "5000000000";

export const khalaRoutersConfig: Omit<RouteConfigs, "from">[] = [
{
to: "karura",
token: "PHA",
xcm: {
fee: { token: "PHA", amount: "51200000000" },
weightLimit: DEST_WEIGHT,
},
},
{
to: "karura",
token: "KUSD",
xcm: {
fee: { token: "KUSD", amount: "4616667257" },
weightLimit: DEST_WEIGHT,
},
},
{
to: "karura",
token: "KAR",
xcm: {
fee: { token: "KAR", amount: "6400000000" },
weightLimit: DEST_WEIGHT,
},
},
];
Expand Down Expand Up @@ -232,7 +227,7 @@ class BasePhalaAdapter extends BaseCrossChainAdapter {
interior: {
X2: [
{ Parachain: toChain.paraChainId },
{ AccountId32: { id: accountId, network: "Any" } },
{ AccountId32: { id: accountId } },
],
},
};
Expand Down Expand Up @@ -263,11 +258,7 @@ class BasePhalaAdapter extends BaseCrossChainAdapter {
};
}

return this.api.tx.xTransfer.transfer(
asset,
dst,
this.getDestWeight(token, to)?.toString()
);
return this.api.tx.xTransfer.transfer(asset, dst);
}
}

Expand Down

0 comments on commit fe31230

Please sign in to comment.