Skip to content

Commit

Permalink
Merge branch 'sprint-1.18' into feat/storageversion-list
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitenjain14 authored Nov 8, 2024
2 parents 8c3952c + 5217a55 commit daee72e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/client/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ func SetWallet(w zcncrypto.Wallet) {
client.wallets[w.ClientID] = &w
}

// SetWalletMode sets current wallet split key mode.
func SetWalletMode(mode bool) {
client.wallet.IsSplit = mode
}

// splitKeyWallet parameter is valid only if SignatureScheme is "BLS0Chain"
func SetSplitKeyWallet(isSplitKeyWallet bool) error {
if client.signatureScheme == constants.BLS0CHAIN.String() {
Expand Down
1 change: 1 addition & 0 deletions wasmsdk/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ func main() {
//sdk
"init": initSDKs,
"setWallet": setWallet,
"setWalletMode": setWalletMode,
"getPublicEncryptionKey": zcncore.GetPublicEncryptionKey,
"hideLogs": hideLogs,
"showLogs": showLogs,
Expand Down
6 changes: 6 additions & 0 deletions wasmsdk/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ func setWallet(clientID, clientKey, peerPublicKey, publicKey, privateKey, mnemon

return nil
}

func setWalletMode(mode bool) {
client.SetWalletMode(mode)

fmt.Println("gosdk setWalletMode: ", "is split:", mode)
}

0 comments on commit daee72e

Please sign in to comment.