camaraproject / BlockchainPublicAddress

Repository to describe, develop, document and test the Blockchain Public Address API family
Apache License 2.0
6 stars 4 forks source link

Required 'currency' information in API design #12

Closed PedroDiez closed 9 months ago

PedroDiez commented 11 months ago

Problem description 'currency' use within the API design (binding and GET endpoints)

During 20th July meeting, VF raised need of indicating a currency in binding and fetch blockchain functionality. Within a given blockchain, several currencies may be used, so it might not be considered as mandatory in design

Possible evolution Set currency as optional (just a string or an array of strings)

Alternative solution

Additional context N/A

PedroDiez commented 11 months ago

Internally commented.

PedroDiez commented 11 months ago

Proposal in 10/AGO meeting.

Make currency as optional Array:

image

Used in

GET Response Retrieves Blockchain Public Address associated to a phone_number.

POST Request Binds Blockchain Public Address to a phone_number

Exception Added in POST Request:

Currency indication is required ("code": "BLOCKCHAIN_PUBLIC_ADDRESS.CURRENCY_REQUIRED","message": "One currency is required")

image

VF seems OK with proposal DT would like to check some corner cases to see whether some scam scenario

PedroDiez commented 10 months ago

@grgpapadopoulos Have you checked this point? Just to have your feedback on this

PedroDiez commented 10 months ago

31/AGO: Issue is kept open

Some topics talked. As commented, please @grgpapadopoulos, @sebKoeller, @engst03, @ksl4dtit you can provide feedback here

Points commented:

ghost commented 9 months ago
image

What's the meaning behind this "one currency is required" exception? Can you elaborate on this?

PedroDiez commented 9 months ago

@grgpapadopoulos Can you provide feedback about the "scum" scenarios you would like to check and relationship with this topic?

PedroDiez commented 9 months ago
image

What's the meaning behind this "one currency is required" exception? Can you elaborate on this?

Pedro: This exception is for the case when underlying blockchain address is restricted to be used with a set of specific currency(ies). So in the binding, they are indicated the specific currencies allowed to be used within the blockchain

ghost commented 9 months ago

Pedro: This exception is for the case when underlying blockchain address is restricted to be used with a set of specific currency(ies). So in the binding, they are indicated the specific currencies allowed to be used within the blockchain

The currency array can be left empty, so why would we need this exception?

PedroDiez commented 9 months ago

Pedro: This exception is for the case when underlying blockchain address is restricted to be used with a set of specific currency(ies). So in the binding, they are indicated the specific currencies allowed to be used within the blockchain

The currency array can be left empty, so why would we need this exception?

Yes, it can be empty for the scenario of no setting any restriction. However, BE logic may required in some blockchain to have explicitly the currency indicated

PedroDiez commented 9 months ago

Can we close then this topic?

ghost commented 9 months ago

Yep.

grgpapadopoulos commented 9 months ago

Hello, sorry for this delayed response, it's ok, plz close the topic

PedroDiez commented 9 months ago

Agreed to be closed during the meeting 06/oct