Skip to content

Commit

Permalink
fix args type for Transaction type
Browse files Browse the repository at this point in the history
  • Loading branch information
wpdas committed Feb 2, 2024
1 parent fac4c0d commit f580a44
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ walletApi.signInModal()
- `call`: Call a method that changes the contract's state. This is payable. It has the following parameters:
- `method`: Contract's method name
- `props?`: an optional parameter with `args` for the contract's method, `gas`, `deposit` to be attached and `callbackUrl` if you want to take the user to a specific page after a transaction succeeds.
- `callMultiple`: Call multiple methods that changes the contract's state. This is payable and has the following parameters:
- `callMultiple`: Call multiple methods that change the contract's state. This is payable and has the following parameters:
- `transactionsList`: A list of Transaction props. You can use `buildTransaction(...)` to help you out
- `callbackUrl?`: A page to take the user to after all the transactions succeeds.
- `callbackUrl?`: A page to take the user to after all the transactions succeed.

#### Wallet API Reference

Expand Down Expand Up @@ -296,9 +296,9 @@ useEffect(() => {
- `call`: Call a method that changes the contract's state. This is payable. It has the following parameters:
- `method`: Contract's method name
- `props?`: an optional parameter with `args` for the contract's method, `gas`, `deposit` to be attached and `callbackUrl` if you want to take the user to a specific page after a transaction succeeds.
- `callMultiple`: Call multiple methods that changes the contract's state. This is payable and has the following parameters:
- `callMultiple`: Call multiple methods that change the contract's state. This is payable and has the following parameters:
- `transactionsList`: A list of Transaction props. You can use `buildTransaction(...)` to help you out
- `callbackUrl?`: A page to take the user to after all the transactions succeeds.
- `callbackUrl?`: A page to take the user to after all the transactions succeed.

<!-- To add a separator line -->

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wpdas/naxios",
"version": "1.2.0",
"version": "1.2.1",
"description": "Promise based NEAR Contract and NEAR Wallet client for browser",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/managers/contract-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ContractManager {
type: 'FunctionCall',
params: {
methodName: transaction.method,
args: transaction.args,
args: transaction.args || {},
gas: transaction.gas || THIRTY_TGAS,
deposit: transaction.deposit || NO_DEPOSIT,
},
Expand Down
2 changes: 1 addition & 1 deletion src/managers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type ChangeMethodArgs<A> = {
export type Transaction<A> = {
receiverId?: string
method: string
args: A
args?: A
gas?: string
/**
* yoctoⓃ amount
Expand Down

0 comments on commit f580a44

Please sign in to comment.