Skip to content

Commit

Permalink
fix: mythos transfer (#2853)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuul-wq authored Dec 12, 2024
1 parent 2083071 commit 32f9d56
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/renderer/entities/transaction/lib/extrinsicService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,18 @@ export const getUnsignedTransaction: Record<
[TransactionType.ASSET_TRANSFER]: (transaction, info, options, api) => {
const palletName = transaction.args.palletName ?? 'assets';
const methodArgs = api.tx[palletName].transfer.meta.args;
const rawArgs = [transaction.args.asset, transaction.args.target, transaction.args.amount];
const rawArgs = [transaction.args.asset, transaction.args.dest, transaction.args.value];
const args = zipWith(methodArgs, rawArgs, (method, arg) => {
return [method.name.toString(), api.createType(method.type.toString(), arg)] as const;
});

const argsMap = Object.fromEntries(args);

return defineMethod(
{
method: {
name: 'transfer',
pallet: transaction.args.palletName ?? 'assets',
pallet: palletName,
// @ts-expect-error defineMethod type disallow Codec type
args: argsMap,
args: Object.fromEntries(args),
},
...info,
},
Expand Down

0 comments on commit 32f9d56

Please sign in to comment.