Fix/1888: Multisig - add and remove signer methods nonce needs to be an int (#1890)
* Fix/1888: Multisig - nonce needs to be an int * Fix/1888: Handle big numbers and do it without making ts angry
This commit is contained in:
parent
5ecf7d6a9f
commit
bcb0f9636a
@ -1,4 +1,4 @@
|
||||
import { ethers } from 'ethers';
|
||||
import { ethers, BigNumber } from 'ethers';
|
||||
import abi from '../abis/multisig_abi.json';
|
||||
|
||||
export class MultisigControl {
|
||||
@ -14,11 +14,15 @@ export class MultisigControl {
|
||||
}
|
||||
|
||||
add_signer(newSigner: string, nonce: string, signatures: string) {
|
||||
return this.contract.add_signer(newSigner, nonce, signatures);
|
||||
return this.contract.add_signer(
|
||||
newSigner,
|
||||
BigNumber.from(nonce),
|
||||
signatures
|
||||
);
|
||||
}
|
||||
|
||||
burn_nonce(nonce: string, signatures: string) {
|
||||
return this.contract.burn_nonce(nonce, signatures);
|
||||
return this.contract.burn_nonce(BigNumber.from(nonce), signatures);
|
||||
}
|
||||
|
||||
get_current_threshold() {
|
||||
@ -38,11 +42,19 @@ export class MultisigControl {
|
||||
}
|
||||
|
||||
remove_signer(oldSigner: string, nonce: string, signatures: string) {
|
||||
return this.contract.remove_signer(oldSigner, nonce, signatures);
|
||||
return this.contract.remove_signer(
|
||||
oldSigner,
|
||||
BigNumber.from(nonce),
|
||||
signatures
|
||||
);
|
||||
}
|
||||
|
||||
set_threshold(newThreshold: string, nonce: string, signatures: string) {
|
||||
return this.contract.set_threshold(newThreshold, nonce, signatures);
|
||||
return this.contract.set_threshold(
|
||||
newThreshold,
|
||||
BigNumber.from(nonce),
|
||||
signatures
|
||||
);
|
||||
}
|
||||
|
||||
signers(address: string) {
|
||||
@ -50,6 +62,10 @@ export class MultisigControl {
|
||||
}
|
||||
|
||||
verify_signatures(nonce: string, message: string, signatures: string) {
|
||||
return this.contract.verify_signatures(nonce, message, signatures);
|
||||
return this.contract.verify_signatures(
|
||||
BigNumber.from(nonce),
|
||||
message,
|
||||
signatures
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user