mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 04:34:19 +01:00
[SDK] Fix tx history & Update WASM (#353)
* bugfix on detecting pending vtxos * bugfix: don't return on error from previous round * bugfix on wasm browser storage * implements listVtxos on SDK * Bug fix Co-authored-by: Pietralberto Mazza <altafan@users.noreply.github.com> * bug fix * Fixes * revert RedeemTx check * Fix after merge * bug fix on wasm wrapper * Fix static tx history (without tx feed) * add createAt timestamp in Vtxo domain * Fixes * Fixes * Polish * Fix * Fix --------- Co-authored-by: Pietralberto Mazza <altafan@users.noreply.github.com> Co-authored-by: altafan <18440657+altafan@users.noreply.github.com> Co-authored-by: louisinger <louis@vulpem.com>
This commit is contained in:
@@ -40,17 +40,18 @@ func (v *vxtoRepository) AddVtxos(ctx context.Context, vtxos []domain.Vtxo) erro
|
||||
|
||||
if err := querierWithTx.UpsertVtxo(
|
||||
ctx, queries.UpsertVtxoParams{
|
||||
Txid: vtxo.Txid,
|
||||
Vout: int64(vtxo.VOut),
|
||||
Pubkey: vtxo.Pubkey,
|
||||
Amount: int64(vtxo.Amount),
|
||||
PoolTx: vtxo.RoundTxid,
|
||||
SpentBy: vtxo.SpentBy,
|
||||
Spent: vtxo.Spent,
|
||||
Redeemed: vtxo.Redeemed,
|
||||
Swept: vtxo.Swept,
|
||||
ExpireAt: vtxo.ExpireAt,
|
||||
RedeemTx: sql.NullString{String: vtxo.RedeemTx, Valid: true},
|
||||
Txid: vtxo.Txid,
|
||||
Vout: int64(vtxo.VOut),
|
||||
Pubkey: vtxo.Pubkey,
|
||||
Amount: int64(vtxo.Amount),
|
||||
PoolTx: vtxo.RoundTxid,
|
||||
SpentBy: vtxo.SpentBy,
|
||||
Spent: vtxo.Spent,
|
||||
Redeemed: vtxo.Redeemed,
|
||||
Swept: vtxo.Swept,
|
||||
ExpireAt: vtxo.ExpireAt,
|
||||
CreatedAt: vtxo.CreatedAt,
|
||||
RedeemTx: sql.NullString{String: vtxo.RedeemTx, Valid: true},
|
||||
},
|
||||
); err != nil {
|
||||
return err
|
||||
@@ -258,6 +259,7 @@ func rowToVtxo(row queries.Vtxo) domain.Vtxo {
|
||||
Swept: row.Swept,
|
||||
ExpireAt: row.ExpireAt,
|
||||
RedeemTx: row.RedeemTx.String,
|
||||
CreatedAt: row.CreatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user