Skip to content

Commit e9a0a90

Browse files
committed
Fixes
1 parent 6086f8a commit e9a0a90

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

pkg/client-sdk/base_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ func (a *arkClient) ListVtxos(ctx context.Context) (
183183

184184
for _, vtxo := range resp.Vtxos {
185185
if vtxo.Spent || vtxo.Swept || vtxo.Redeemed {
186-
spentVtxos = append(spentVtxos, toTypesVtxo(vtxo))
186+
spentVtxos = append(spentVtxos, vtxo)
187187
continue
188188
}
189-
spendableVtxos = append(spendableVtxos, toTypesVtxo(vtxo))
189+
spendableVtxos = append(spendableVtxos, vtxo)
190190
}
191191

192192
return

pkg/client-sdk/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,14 +1213,14 @@ func (a *covenantlessArkClient) refreshVtxoDb(spendableVtxos, spentVtxos []types
12131213
vtxosToAdd := make([]types.Vtxo, 0, len(spendableVtxos))
12141214
for _, vtxo := range spendableVtxos {
12151215
if _, ok := oldSpendableVtxoMap[vtxo.VtxoKey]; !ok {
1216-
vtxosToAdd = append(vtxosToAdd, toTypesVtxo(vtxo))
1216+
vtxosToAdd = append(vtxosToAdd, vtxo)
12171217
}
12181218
}
12191219

12201220
vtxosToReplace := make([]types.Vtxo, 0, len(spentVtxos))
12211221
for _, vtxo := range spentVtxos {
12221222
if _, ok := oldSpendableVtxoMap[vtxo.VtxoKey]; ok {
1223-
vtxosToReplace = append(vtxosToReplace, toTypesVtxo(vtxo))
1223+
vtxosToReplace = append(vtxosToReplace, vtxo)
12241224
}
12251225
}
12261226

pkg/client-sdk/utils.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -584,20 +584,6 @@ func getFancyTimeExpiration(nextExpiration int64) string {
584584
return fancyTimeExpiration
585585
}
586586

587-
func toTypesVtxo(src types.Vtxo) types.Vtxo {
588-
return types.Vtxo{
589-
VtxoKey: types.VtxoKey{
590-
Txid: src.Txid,
591-
VOut: src.VOut,
592-
},
593-
Script: src.Script,
594-
Amount: src.Amount,
595-
CommitmentTxid: src.CommitmentTxid,
596-
ExpiresAt: src.ExpiresAt,
597-
CreatedAt: src.CreatedAt,
598-
}
599-
}
600-
601587
func computeVSize(tx *wire.MsgTx) lntypes.VByte {
602588
baseSize := tx.SerializeSizeStripped()
603589
totalSize := tx.SerializeSize() // including witness

0 commit comments

Comments
 (0)