mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 04:34:19 +01:00
Drop PendingChange field (#331)
* Drop pending_change * Fixes * Polish * Fallback to psbt string
This commit is contained in:
committed by
GitHub
parent
2be78b0115
commit
b15c0868b2
@@ -265,7 +265,7 @@ func (s *covenantlessService) CompleteAsyncPayment(
|
||||
for outIndex, out := range redeemPtx.UnsignedTx.TxOut {
|
||||
desc := asyncPayData.receivers[outIndex].Descriptor
|
||||
_, _, _, _, err := descriptor.ParseReversibleVtxoDescriptor(desc)
|
||||
isChange := err != nil
|
||||
isPending := err == nil
|
||||
|
||||
vtxos = append(vtxos, domain.Vtxo{
|
||||
VtxoKey: domain.VtxoKey{
|
||||
@@ -281,7 +281,7 @@ func (s *covenantlessService) CompleteAsyncPayment(
|
||||
RedeemTx: redeemTx,
|
||||
UnconditionalForfeitTxs: unconditionalForfeitTxs,
|
||||
},
|
||||
PendingChange: isChange,
|
||||
Pending: isPending,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ func (s *covenantlessService) CreateAsyncPayment(
|
||||
if vtxo.Swept {
|
||||
return "", nil, fmt.Errorf("all vtxos must be swept")
|
||||
}
|
||||
if vtxo.AsyncPayment != nil && !vtxo.PendingChange {
|
||||
if vtxo.Pending {
|
||||
return "", nil, fmt.Errorf("all vtxos must be claimed")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user