Skip to content

Commit

Permalink
fix func def for dsbackend
Browse files Browse the repository at this point in the history
  • Loading branch information
ta0li committed Jan 4, 2022
1 parent d6da2ff commit 513a533
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/wallet/dsbackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (backend *DSBackend) HasAddress(ctx context.Context, addr address.Address)

// NewAddress creates a new address and stores it.
// Safe for concurrent access.
func (backend *DSBackend) NewAddress(protocol address.Protocol) (address.Address, error) {
func (backend *DSBackend) NewAddress(ctx context.Context, protocol address.Protocol) (address.Address, error) {
backend.lk.Lock()
defer backend.lk.Unlock()

Expand Down Expand Up @@ -180,7 +180,7 @@ func (backend *DSBackend) putKeyInfo(ctx context.Context, ki *crypto.KeyInfo) er
return err
}

if err := backend.ds.Put(ds.NewKey(key.Address.String()), keyJSON); err != nil {
if err := backend.ds.Put(ctx, ds.NewKey(key.Address.String()), keyJSON); err != nil {
return errors.Wrapf(err, "failed to store new address: %s", key.Address.String())
}
backend.cache[addr] = struct{}{}
Expand Down

0 comments on commit 513a533

Please sign in to comment.