Skip to content

Commit a712a31

Browse files
committed
fixed response structure
1 parent 8f866b9 commit a712a31

File tree

4 files changed

+53
-53
lines changed

4 files changed

+53
-53
lines changed

internal/api/common/common.go

+3-6
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,9 @@ func ToStatusResponse(d *database.Deposit) *apiTypes.CheckWithdrawalResponse {
5858
DepositBlock: d.DepositBlock,
5959
Signature: d.Signature,
6060
}
61-
62-
if d.WithdrawalTxHash != nil {
63-
result.WithdrawalIdentifier = &types.WithdrawalIdentifier{
64-
TxHash: *d.WithdrawalTxHash,
65-
ChainId: d.WithdrawalChainId,
66-
}
61+
result.WithdrawalIdentifier = &types.WithdrawalIdentifier{
62+
TxHash: d.WithdrawalTxHash,
63+
ChainId: d.WithdrawalChainId,
6764
}
6865

6966
return result

internal/api/types/api_server.pb.gw.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/types/deposit.pb.go

+48-46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/deposit/deposit.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ message DepositIdentifier {
2020
}
2121

2222
message WithdrawalIdentifier {
23-
string tx_hash = 1;
23+
optional string tx_hash = 1;
2424
string chain_id = 2;
2525
}
2626

0 commit comments

Comments
 (0)