Skip to content

Commit

Permalink
fix(x/warden): avoid interrupting entire query if one key fails to de…
Browse files Browse the repository at this point in the history
…rive an address (#120)
  • Loading branch information
Pitasi committed Mar 25, 2024
1 parent e35f3ef commit 409e600
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions warden/x/warden/keeper/query_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ func (k Keeper) Keys(goCtx context.Context, req *types.QueryKeysRequest) (*types
walletType = types.WalletType_WALLET_TYPE_CELESTIA
}
if err != nil {
return nil, err
ctx.Logger().Warn("failed to derive address for key %d: %w", value.Id, err)
continue
}
response.Wallets = append(response.Wallets, &types.WalletKeyResponse{
Address: address,
Expand Down Expand Up @@ -100,7 +101,8 @@ func (k Keeper) Keys(goCtx context.Context, req *types.QueryKeysRequest) (*types
// walletType = types.WalletType_WALLET_TYPE_SUI
// }
if err != nil {
return nil, err
ctx.Logger().Warn("failed to derive address for key %d: %w", value.Id, err)
continue
}
response.Wallets = append(response.Wallets, &types.WalletKeyResponse{
Address: address,
Expand Down

0 comments on commit 409e600

Please sign in to comment.