Skip to content

Commit

Permalink
attempt to unlock wallet during expired bond refund
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <[email protected]>
  • Loading branch information
ukane-philemon committed Oct 10, 2024
1 parent 02e33d2 commit bda10a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/core/bond.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,13 @@ func (c *Core) refundExpiredBonds(ctx context.Context, acct *dexAccount, cfg *de
//
// TODO: if mustPost > 0 { wallet.RenewBond(...) }

// Ensure wallet is unlocked for use below.
_, err = wallet.refreshUnlock()
if err != nil {
c.log.Errorf("failed to unlock bond asset wallet %v: %v", unbip(state.BondAssetID), err)
continue
}

// Generate a refund tx paying to an address from the currently
// connected wallet, using bond.KeyIndex to create the signed
// transaction. The RefundTx is really a backup.
Expand Down

0 comments on commit bda10a3

Please sign in to comment.