From 5a344b3de69d91a88f07e273560120f193d2bb4d Mon Sep 17 00:00:00 2001 From: Lim SangHyun Date: Wed, 9 Nov 2022 12:32:42 +0900 Subject: [PATCH] Fix type typo of multipleKeyring --- .../caver-account/src/accountKey/weightedMultiSigOptions.d.ts | 2 +- types/test/account-test.ts | 4 ++-- types/test/wallet-test.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/packages/caver-account/src/accountKey/weightedMultiSigOptions.d.ts b/types/packages/caver-account/src/accountKey/weightedMultiSigOptions.d.ts index 462a892f..4be9c23e 100644 --- a/types/packages/caver-account/src/accountKey/weightedMultiSigOptions.d.ts +++ b/types/packages/caver-account/src/accountKey/weightedMultiSigOptions.d.ts @@ -15,7 +15,7 @@ export interface WeightedMultiSigOptionsObject { threshold?: number - weigths?: number[] + weights?: number[] weight?: number[] } diff --git a/types/test/account-test.ts b/types/test/account-test.ts index 8ec5d3d8..c321ed94 100644 --- a/types/test/account-test.ts +++ b/types/test/account-test.ts @@ -78,7 +78,7 @@ const weightedMultiSigOptions = new WeightedMultiSigOptions(3, [1, 1, 1]) // $ExpectType Account account = Account.createWithAccountKeyWeightedMultiSig(address, pubKeys) // $ExpectType Account -account = Account.createWithAccountKeyWeightedMultiSig(address, pubKeys, { threshold: 3, weigths: [1, 1, 1] }) +account = Account.createWithAccountKeyWeightedMultiSig(address, pubKeys, { threshold: 3, weights: [1, 1, 1] }) // $ExpectType Account account = Account.createWithAccountKeyWeightedMultiSig(address, pubKeys, weightedMultiSigOptions) @@ -88,7 +88,7 @@ account = Account.createWithAccountKeyRoleBased(address, [pubKeys, pubKeys, pubK account = Account.createWithAccountKeyRoleBased( address, [pubKeys, pubKeys, pubKeys], - [{ threshold: 3, weigths: [1, 1, 1] }, { threshold: 3, weigths: [1, 1, 1] }, { threshold: 3, weigths: [1, 1, 1] }] + [{ threshold: 3, weights: [1, 1, 1] }, { threshold: 3, weights: [1, 1, 1] }, { threshold: 3, weights: [1, 1, 1] }] ) // $ExpectType Account account = Account.createWithAccountKeyRoleBased( diff --git a/types/test/wallet-test.ts b/types/test/wallet-test.ts index 0f2b6f7f..c6e6e424 100644 --- a/types/test/wallet-test.ts +++ b/types/test/wallet-test.ts @@ -454,7 +454,7 @@ multipleKeyring.getKeyByRole(0) // $ExpectType Account multipleKeyring.toAccount() // $ExpectType Account -multipleKeyring.toAccount({ threshold: 3, weigths: [1, 2] }) +multipleKeyring.toAccount({ threshold: 3, weights: [1, 2] }) // $ExpectType Account multipleKeyring.toAccount(new WeightedMultiSigOptions(3, [1, 2])) @@ -500,7 +500,7 @@ roleBasedKeyring.getKeyByRole(0) // $ExpectType Account roleBasedKeyring.toAccount() // $ExpectType Account -roleBasedKeyring.toAccount([{ threshold: 3, weigths: [1, 2] }, { threshold: 3, weigths: [1, 2] }, { threshold: 3, weigths: [1, 2] }]) +roleBasedKeyring.toAccount([{ threshold: 3, weights: [1, 2] }, { threshold: 3, weights: [1, 2] }, { threshold: 3, weights: [1, 2] }]) // $ExpectType Account roleBasedKeyring.toAccount([ new WeightedMultiSigOptions(3, [1, 2]),