Skip to content

Commit

Permalink
fix(sui): fix tests and simplify code (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 authored Feb 7, 2024
1 parent 2c2b65c commit 93678a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/sui/src/codegen/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export class SuiCodegen extends AbstractCodegen<
const args = []
const argsLen = func.params.length
for (const [idx, arg] of func.params.entries()) {
if (idx === argsLen - 1 && arg.name() == 'TxContext' && arg.module() == 'tx_context') {
continue
if (idx === argsLen - 1 && arg.qname === '0x2::tx_context::TxContext') {
// no op
} else if (arg.reference) {
args.push({
paramType: `${this.ADDRESS_TYPE} | ObjectCallArg | TransactionArgument`,
Expand Down
4 changes: 2 additions & 2 deletions packages/sui/src/tests/move-call.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ describe('Test Sui call', () => {
const client = new SuiClient({ url: getFullnodeUrl('testnet') })
const tx = new TransactionBlock()
const [coin] = tx.splitCoins(tx.gas, [tx.pure(100)])
clob_v2.builder.createAccount(tx, ['0xd9e6dc1e7f0790c18acf96b629f0a236d56de2f96537d921197bcb0e071b12bd'])
clob_v2.builder.createAccount(tx, [tx.object('0x2')])
clob_v2.builder.createAccount(tx, [])
clob_v2.builder.createPool(tx, [1n, 1n, '0x1::coin::USD'], ['coin1', 'coin2'])

// client.signAndExecuteTransactionBlock({transactionBlock: tx, signer: keypair})

Expand Down

0 comments on commit 93678a5

Please sign in to comment.