Skip to content

Commit 97a0911

Browse files
committed
staticaddr/loopin: restore deposit address params
1 parent e8f8908 commit 97a0911

3 files changed

Lines changed: 44 additions & 1 deletion

File tree

loopdb/sqlc/queries/static_address_loopin.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,19 @@ WHERE
131131
-- name: DepositsForSwapHash :many
132132
SELECT
133133
d.*,
134+
sa.client_pubkey client_pubkey,
135+
sa.server_pubkey server_pubkey,
136+
sa.expiry expiry,
137+
sa.client_key_family client_key_family,
138+
sa.client_key_index client_key_index,
139+
sa.pkscript pkscript,
140+
sa.protocol_version protocol_version,
141+
sa.initiation_height initiation_height,
134142
u.update_state,
135143
u.update_timestamp
136144
FROM
137145
deposits d
146+
LEFT JOIN static_addresses sa ON sa.id = d.static_address_id
138147
LEFT JOIN
139148
deposit_updates u ON u.id = (
140149
SELECT id
@@ -150,4 +159,3 @@ WHERE
150159

151160

152161

153-

loopdb/sqlc/static_address_loopin.sql.go

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staticaddr/loopin/sql_store.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,16 @@ func toStaticAddressLoopIn(_ context.Context, network *chaincfg.Params,
542542
TimeoutSweepPkScript: d.TimeoutSweepPkScript,
543543
ExpirySweepTxid: d.ExpirySweepTxid,
544544
FinalizedWithdrawalTx: d.FinalizedWithdrawalTx,
545+
SwapHash: d.SwapHash,
546+
StaticAddressID: d.StaticAddressID,
547+
ClientPubkey: d.ClientPubkey,
548+
ServerPubkey: d.ServerPubkey,
549+
Expiry: d.Expiry,
550+
ClientKeyFamily: d.ClientKeyFamily,
551+
ClientKeyIndex: d.ClientKeyIndex,
552+
Pkscript: d.Pkscript,
553+
ProtocolVersion: d.ProtocolVersion,
554+
InitiationHeight: d.InitiationHeight,
545555
}
546556

547557
sqlcDepositUpdate := sqlc.DepositUpdate{

0 commit comments

Comments
 (0)