Skip to content

Commit

Permalink
fix attached/deposit name in change method args
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Jul 2, 2024
1 parent 26a7b82 commit 6f6e5a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/chains/near.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { keyStores, KeyPair, connect, Account } from "near-api-js";

export const TGAS = 1000000000000n;
export const NO_DEPOSIT = "0";
export const ONE_YOCTO = "1";

export interface NearConfig {
networkId: string;
Expand Down
10 changes: 5 additions & 5 deletions src/mpcContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
najPublicKeyStrToUncompressedHexPoint,
uncompressedHexPointToEvmAddress,
} from "./utils/kdf";
import { NO_DEPOSIT, TGAS } from "./chains/near";
import { TGAS, ONE_YOCTO } from "./chains/near";
import {
MPCSignature,
NearContractFunctionPayload,
Expand All @@ -20,10 +20,10 @@ export interface ChangeMethodArgs<T> {
args: T;
/// GasLimit on transaction execution.
gas: string;
/// Deposit (i.e. payable amount) to attach to transaction.
attachedDeposit: string;
/// Account Signing the call
signerAccount: Account;
/// attachedDeposit (i.e. payable amount) to attach to transaction.
amount: string;
}

interface MultichainContractInterface extends Contract {
Expand Down Expand Up @@ -74,7 +74,7 @@ export class MultichainContract {
signerAccount: this.connectedAccount,
args: { request: signArgs },
gas: gasOrDefault(gas),
attachedDeposit: NO_DEPOSIT,
amount: ONE_YOCTO,
});
return { big_r, big_s };
};
Expand All @@ -93,7 +93,7 @@ export class MultichainContract {
methodName: "sign",
args: { request: signArgs },
gas: gasOrDefault(gas),
deposit: NO_DEPOSIT,
deposit: ONE_YOCTO,
},
},
],
Expand Down

0 comments on commit 6f6e5a4

Please sign in to comment.