Skip to content

Commit

Permalink
Merge pull request #434 from icon-project/fix/wasm-key-create
Browse files Browse the repository at this point in the history
fix: set SDK context before account creation
  • Loading branch information
debendraoli authored Nov 20, 2024
2 parents 30326c3 + 6f0646c commit 34a4dc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relayer/chains/wasm/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ func (p *Provider) RestoreKeystore(ctx context.Context) error {
}

func (p *Provider) NewKeystore(passphrase string) (string, error) {
done := p.SetSDKContext()
defer done()
armor, addr, err := p.client.CreateAccount(p.NID(), passphrase)
if err != nil {
return "", err
}
done := p.SetSDKContext()
defer done()
encryptedArmor, err := p.kms.Encrypt(context.Background(), []byte(armor))
if err != nil {
return "", err
Expand Down

0 comments on commit 34a4dc4

Please sign in to comment.