We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a488cc + fc5d55e commit 2b4faa8Copy full SHA for 2b4faa8
pkg/tbtcpg/moving_funds.go
@@ -103,6 +103,27 @@ func (mft *MovingFundsTask) Run(request *tbtc.CoordinationProposalRequest) (
103
return nil, false, nil
104
}
105
106
+ // The wallet should not have any unswept deposits.
107
+ unsweptDeposits, err := FindDeposits(
108
+ mft.chain,
109
+ mft.btcChain,
110
+ walletPublicKeyHash,
111
+ 0,
112
+ true,
113
114
+ )
115
+ if err != nil {
116
+ return nil, false, fmt.Errorf(
117
+ "cannot check wallet's unswept deposits: [%w]",
118
+ err,
119
120
+ }
121
+
122
+ if len(unsweptDeposits) > 0 {
123
+ taskLogger.Infof("source wallet has unswept deposits")
124
+ return nil, false, nil
125
126
127
walletMainUtxo, err := tbtc.DetermineWalletMainUtxo(
128
walletPublicKeyHash,
129
mft.chain,
0 commit comments