Skip to content

Commit

Permalink
Update generateTxb.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
daoauth committed Dec 28, 2024
1 parent 7174b8e commit cb40a28
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/ptb-builder/src/utilities/ptb/generateTxb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ const genereateCommand = (
node.data.moveCall?.function!
].parameters;
const target = inputs[0] !== undefined ? inputs[0] : undefined;
const argument =
const typeArguments =
inputs[1] && inputs[1].length > 0
? inputs[1].map((v, i) => {
? inputs[1].map((v) => connvert(v, dictionary) as string)
: undefined;
const argument =
inputs[2] && inputs[2].length > 0
? inputs[2].map((v, i) => {
const temp = connvert(v, dictionary);
if (temp && typeof temp === 'number' && types && types[i]) {
switch (types[i]) {
Expand All @@ -158,10 +162,6 @@ const genereateCommand = (
return temp as TransactionArgument;
})
: undefined;
const typeArguments =
inputs[2] && inputs[2].length > 0
? inputs[2].map((v) => connvert(v, dictionary) as string)
: undefined;
if (target) {
const result = tx.moveCall({
target,
Expand Down

0 comments on commit cb40a28

Please sign in to comment.