Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #731 from klaytn/feature/keyring-typo
Browse files Browse the repository at this point in the history
Fix type typo of multipleKeyring
  • Loading branch information
Nohyun Nehemiah Kwak authored Dec 22, 2022
2 parents ee29459 + 5a344b3 commit 30bc10c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

export interface WeightedMultiSigOptionsObject {
threshold?: number
weigths?: number[]
weights?: number[]
weight?: number[]
}

Expand Down
4 changes: 2 additions & 2 deletions types/test/account-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions types/test/wallet-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]))

Expand Down Expand Up @@ -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]),
Expand Down

0 comments on commit 30bc10c

Please sign in to comment.