Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: phala xcm update #729

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: phala xcm update
kingsleydon committed Mar 31, 2023
commit 07360e43bae44cf13e5a41bd3a8198f8d4298dbe
2 changes: 1 addition & 1 deletion src/hooks/xcm/useTransferRouter.ts
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ export type TransferMode = 'local' | 'xcm';
export const astarNetworks = ['astar', 'shiden', 'shibuya'];
export const astarNativeTokens = ['sdn', 'astr', 'sby'];
const disabledXcmChain = endpointKey.SHIDEN;
const disabledXcmParachains: string[] = [Chain.PHALA, Chain.KHALA];
const disabledXcmParachains: string[] = [];

export interface NetworkFromTo {
from: string;
16 changes: 3 additions & 13 deletions src/v2/repositories/implementations/xcm/PhalaXcmRepository.ts
Original file line number Diff line number Diff line change
@@ -56,23 +56,13 @@ export class PhalaXcmRepository extends XcmRepository {
X2: [
{ Parachain: to.parachainId },
isAccountId20
? {
AccountKey20: {
network: 'Any',
key: recipientAccountId,
},
}
: {
AccountId32: {
network: 'Any',
id: recipientAccountId,
},
},
? { AccountKey20: { key: recipientAccountId } }
: { AccountId32: { id: recipientAccountId } },
],
},
};

const destWeight = '6000000000';
const destWeight = { refTime: '6000000000', proofSize: '0' };
return await this.buildTxCall(from, 'xTransfer', 'transfer', asset, destination, destWeight);
}