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

Fix type typo of multipleKeyring #731

Merged
merged 1 commit into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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