Skip to content

Commit

Permalink
add asset ordering param to ibtc and kbtc
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Sep 24, 2024
1 parent 78fc657 commit 5834723
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/builder/src/fee/FeeBuilder.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface FeeConfigBuilderPrams {

export interface XcmPaymentFeeProps {
isAssetReserveChain: boolean;
shouldTransferAssetPrecedeAsset?: boolean;
shouldTransferAssetPrecedeFeeAsset?: boolean;
}

export interface MoonbeamRuntimeXcmConfigAssetType extends Enum {
Expand Down
4 changes: 2 additions & 2 deletions packages/builder/src/fee/FeeBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function xcmPaymentApi() {
return {
xcmPaymentFee: ({
isAssetReserveChain,
shouldTransferAssetPrecedeAsset = false,
shouldTransferAssetPrecedeFeeAsset = false,
}: XcmPaymentFeeProps): FeeConfigBuilder => ({
build: ({
address,
Expand All @@ -50,7 +50,7 @@ function xcmPaymentApi() {
transferAsset,
chain,
);
const versionedAssets = shouldTransferAssetPrecedeAsset
const versionedAssets = shouldTransferAssetPrecedeFeeAsset
? [versionedTransferAssetId, versionedAssetId]
: [versionedAssetId, versionedTransferAssetId];

Expand Down
7 changes: 4 additions & 3 deletions packages/config/src/xcm-configs/interlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ export const interlayRoutes = new ChainRoutes({
chain: moonbeam,
balance: BalanceBuilder().substrate().assets().account(),
fee: {
amount: FeeBuilder()
.xcmPaymentApi()
.xcmPaymentFee({ isAssetReserveChain: false }),
amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({
isAssetReserveChain: false,
shouldTransferAssetPrecedeFeeAsset: true,
}),
asset: intr,
},
},
Expand Down
7 changes: 4 additions & 3 deletions packages/config/src/xcm-configs/kintsugi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ export const kintsugiRoutes = new ChainRoutes({
chain: moonriver,
balance: BalanceBuilder().substrate().assets().account(),
fee: {
amount: FeeBuilder()
.xcmPaymentApi()
.xcmPaymentFee({ isAssetReserveChain: false }),
amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({
isAssetReserveChain: false,
shouldTransferAssetPrecedeFeeAsset: true,
}),
asset: kint,
},
},
Expand Down

0 comments on commit 5834723

Please sign in to comment.