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 Jun 12, 2024
1 parent a9fc30d commit b934bfb
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 @@ -3,6 +3,7 @@ import { Wallet } from "@near-wallet-selector/core";

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, nearAccountFromEnv, TGAS } from "./chains/near";
import { nearAccountFromEnv, TGAS, ONE_YOCTO } from "./chains/near";
import {
MPCSignature,
NearContractFunctionPayload,
Expand All @@ -18,8 +18,8 @@ export interface ChangeMethodArgs<T> {
args: T;
/// GasLimit on transaction execution.
gas: string;
/// Deposit (i.e. payable amount) to attach to transaction.
attachedDeposit: string;
/// 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 {
const { big_r, s } = await this.contract.sign({
args: { request: signArgs },
gas: gasOrDefault(gas),
attachedDeposit: NO_DEPOSIT,
amount: ONE_YOCTO,
});
return { big_r, big_s: 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 b934bfb

Please sign in to comment.