staticaddr: show deposits as part of cli swap output

This commit is contained in:
Slyghtning 2025-08-12 13:45:51 +02:00
parent a41334dd3d
commit b2a4d7af2d
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF
5 changed files with 512 additions and 427 deletions

View file

@ -14,7 +14,7 @@ func TestToDeposit(t *testing.T) {
depositID, err := GetRandomDepositID()
require.NoError(t, err)
swapHash, err := lntypes.MakeHash(dummyTxHashBytes())
swapHash, err := lntypes.MakeHash(dummyHashBytes())
require.NoError(t, err)
tx := wire.NewMsgTx(2)
@ -65,13 +65,12 @@ func TestToDeposit(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, result)
require.Equal(t, fsm.StateType(test.lastUpdate.UpdateState), result.state)
require.NotNil(t, result.SwapHash)
}
})
}
}
func dummyTxHashBytes() []byte {
func dummyHashBytes() []byte {
return []byte{0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,