Skip to content

Commit

Permalink
remove Currency for Iden3PaymentRailsRequestV1 and Iden3PaymentRailsE…
Browse files Browse the repository at this point in the history
…RC20RequestV1
  • Loading branch information
volodymyr-basiuk committed Dec 4, 2024
1 parent 5c082c1 commit 150691f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions protocol/payment.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ type Iden3PaymentRailsRequestV1 struct {
ExpirationDate string `json:"expirationDate"`
Proof PaymentProof `json:"proof"`
Metadata string `json:"metadata"`
Currency string `json:"currency"`
}

// PaymentRequestType implements the PaymentRequestInfoDataItem interface.
Expand All @@ -194,7 +193,6 @@ type Iden3PaymentRailsERC20RequestV1 struct {
ExpirationDate string `json:"expirationDate"`
Proof PaymentProof `json:"proof"`
Metadata string `json:"metadata"`
Currency string `json:"currency"`
TokenAddress string `json:"tokenAddress"`
Features []PaymentFeatures `json:"features,omitempty"`
}
Expand Down
14 changes: 0 additions & 14 deletions protocol/payment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func TestPaymentRequestMessagePaymentTypeUnmarshall(t *testing.T) {
"@context": "https://schema.iden3.io/core/jsonld/payment.jsonld#Iden3PaymentRailsRequestV1",
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "30001",
"currency": "ETHWEI",
"expirationDate": "2024-10-14T13:22:31.956Z",
"nonce": "18",
"metadata": "0x",
Expand Down Expand Up @@ -97,7 +96,6 @@ func TestPaymentRequestMessagePaymentTypeUnmarshall(t *testing.T) {
],
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "60002",
"currency": "ETHWEI",
"expirationDate": "2024-10-14T13:22:31.956Z",
"nonce": "18",
"metadata": "0x",
Expand Down Expand Up @@ -129,7 +127,6 @@ func TestPaymentRequestMessagePaymentTypeUnmarshall(t *testing.T) {
],
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "90003",
"currency": "ETHWEI",
"expirationDate": "2024-10-14T13:22:31.956Z",
"nonce": "18",
"metadata": "0x",
Expand Down Expand Up @@ -191,7 +188,6 @@ func TestPaymentRequestMessagePaymentTypeUnmarshall(t *testing.T) {
"features": ["EIP-2612"],
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "40",
"currency": "ERC20Token",
"expirationDate": "2024-10-28T16:02:36.816Z",
"nonce": "3008",
"metadata": "0x",
Expand Down Expand Up @@ -369,7 +365,6 @@ func TestPaymentRequestInfoDataUnmarshalMarshall(t *testing.T) {
],
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "30001",
"currency": "ETHWEI",
"expirationDate": "2024-10-14T13:22:31.956Z",
"nonce": "18",
"metadata": "0x",
Expand Down Expand Up @@ -401,7 +396,6 @@ func TestPaymentRequestInfoDataUnmarshalMarshall(t *testing.T) {
],
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "60002",
"currency": "ETHWEI",
"expirationDate": "2024-10-14T13:22:31.956Z",
"nonce": "18",
"metadata": "0x",
Expand Down Expand Up @@ -433,7 +427,6 @@ func TestPaymentRequestInfoDataUnmarshalMarshall(t *testing.T) {
],
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "90003",
"currency": "ETHWEI",
"expirationDate": "2024-10-14T13:22:31.956Z",
"nonce": "18",
"metadata": "0x",
Expand Down Expand Up @@ -469,7 +462,6 @@ func TestPaymentRequestInfoDataUnmarshalMarshall(t *testing.T) {
"type": "Iden3PaymentRailsRequestV1",
"recipient": "0xaddress",
"amount": "100",
"currency": "ETHWEI",
"expirationDate": "ISO string",
"nonce": "25",
"metadata": "0x",
Expand Down Expand Up @@ -505,7 +497,6 @@ func TestPaymentRequestInfoDataUnmarshalMarshall(t *testing.T) {
],
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "40",
"currency": "ERC20Token",
"expirationDate": "2024-10-28T16:02:36.816Z",
"nonce": "3008",
"metadata": "0x",
Expand Down Expand Up @@ -537,7 +528,6 @@ func TestPaymentRequestInfoDataUnmarshalMarshall(t *testing.T) {
"type": "Iden3PaymentRailsRequestV1",
"recipient": "0xaddress2",
"amount": "200",
"currency": "ETHWEI",
"expirationDate": "ISO string",
"nonce": "25",
"metadata": "0x",
Expand Down Expand Up @@ -611,7 +601,6 @@ func TestPaymentRequestInfoData_Construction(t *testing.T) {
"type": "Iden3PaymentRailsRequestV1",
"recipient": "0xaddress",
"amount": "100",
"currency": "ETHWEI",
"proof": [
{
"type": "EthereumEip712Signature2021",
Expand Down Expand Up @@ -647,7 +636,6 @@ func TestPaymentRequestInfoData_Construction(t *testing.T) {
],
"recipient": "0xE9D7fCDf32dF4772A7EF7C24c76aB40E4A42274a",
"amount": "40",
"currency": "ERC20Token",
"proof": [
{
"type": "EthereumEip712Signature2021",
Expand Down Expand Up @@ -704,7 +692,6 @@ func TestPaymentRequestInfoData_Construction(t *testing.T) {
},
},
Metadata: "0x",
Currency: "ETHWEI",
},
protocol.Iden3PaymentRailsERC20RequestV1{
Nonce: "3008",
Expand Down Expand Up @@ -736,7 +723,6 @@ func TestPaymentRequestInfoData_Construction(t *testing.T) {
},
},
Metadata: "0x",
Currency: "ERC20Token",
TokenAddress: "0x2FE40749812FAC39a0F380649eF59E01bccf3a1A",
Features: []protocol.PaymentFeatures{"EIP-2612"},
},
Expand Down

0 comments on commit 150691f

Please sign in to comment.