File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ func (e *EscrowCreate) Flatten() FlatTransaction {
7474 flattened ["Condition" ] = e .Condition
7575 }
7676 if e .DestinationTag != nil {
77- flattened ["DestinationTag" ] = e .DestinationTag
77+ flattened ["DestinationTag" ] = * e .DestinationTag
7878 }
7979
8080 return flattened
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ func (p *PaymentChannelCreate) Flatten() FlatTransaction {
6464 }
6565
6666 if p .DestinationTag != nil {
67- flattened ["DestinationTag" ] = p .DestinationTag
67+ flattened ["DestinationTag" ] = * p .DestinationTag
6868 }
6969
7070 return flattened
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ type XChainClaim struct {
5656 // won't be destroyed, and the transaction can be rerun with a different destination.
5757 Destination types.Address
5858 // An integer destination tag.
59- DestinationTag uint32 `json:",omitempty"`
59+ DestinationTag * uint32 `json:",omitempty"`
6060 // The bridge to use for the transfer.
6161 XChainBridge types.XChainBridge
6262 // The unique integer ID for the cross-chain transfer that was referenced in the corresponding XChainCommit transaction.
@@ -82,8 +82,8 @@ func (x *XChainClaim) Flatten() FlatTransaction {
8282 flatTx ["Destination" ] = x .Destination .String ()
8383 }
8484
85- if x .DestinationTag != 0 {
86- flatTx ["DestinationTag" ] = x .DestinationTag
85+ if x .DestinationTag != nil {
86+ flatTx ["DestinationTag" ] = * x .DestinationTag
8787 }
8888
8989 if x .XChainBridge != (types.XChainBridge {}) {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ func TestXChainClaim_Flatten(t *testing.T) {
3838 },
3939 Amount : types .XRPCurrencyAmount (1000000000 ),
4040 Destination : "r9cZA1mR1tMM4Gx5JqZxtFU1XxHtHa3gE3" ,
41- DestinationTag : 1 ,
41+ DestinationTag : DestinationTag ( 1 ) ,
4242 XChainBridge : types.XChainBridge {
4343 LockingChainDoor : "r9cZA1mR1tMM4Gx5JqZxtFU1XxHtHa3gE3" ,
4444 LockingChainIssue : "r9cZA1mR1tMM4Gx5JqZxtFU1XxHtHa3gE3" ,
@@ -144,7 +144,7 @@ func TestXChainClaim_Validate(t *testing.T) {
144144 },
145145 Amount : types .XRPCurrencyAmount (1000000000 ),
146146 Destination : "r9cZA1mR1tMM4Gx5JqZxtFU1XxHtHa3gE3" ,
147- DestinationTag : 1 ,
147+ DestinationTag : DestinationTag ( 1 ) ,
148148 XChainBridge : types.XChainBridge {
149149 LockingChainDoor : "r9cZA1mR1tMM4Gx5JqZxtFU1XxHtHa3gE3" ,
150150 LockingChainIssue : "r9cZA1mR1tMM4Gx5JqZxtFU1XxHtHa3gE3" ,
You can’t perform that action at this time.
0 commit comments