-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deposit offer whitelisting #58
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knikos
force-pushed
the
feature/deposit-offer-whitelisting
branch
from
October 23, 2023 14:53
a589c1e
to
b1dcefa
Compare
knikos
force-pushed
the
feature/deposit-offer-whitelisting
branch
from
October 24, 2023 07:11
b1dcefa
to
6ffcd95
Compare
knikos
force-pushed
the
feature/deposit-offer-whitelisting
branch
from
October 24, 2023 07:14
6ffcd95
to
c6b808b
Compare
evlekht
reviewed
Oct 26, 2023
evlekht
approved these changes
Oct 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why this should be merged
This PR addresses the need of maintaining (storing/retrieving) signatures used for enabling certain addresses (whitelisting) to deposit funds on certain deposit offers.
How this works
The solution consists of 2 new api methods (
AddSignature
andGetSignatures
), a new db table for storing the signatures as well as the service logic that facilitates the storing and retrieving the information.API changes
The new deposit offer service consists of two new methods:
deposit_offer_id
,addresses
andsignatures
. An optional fieldtimestamp
can be provided to determine the time period to search for active deposit offers. If none provided, current server timestamp is used.address
for which signatures should be retrieved. Furthermore, a timestamp alongside with a signature are required to ensure restriction of access. Finally, a boolean flag calledmultisig
is used to determine whether the provided address is a multisig alias or a signlesig address.DB changes
The new db table stores three fields:
deposit_offer_id
,address
andsignature
. An index is also created for the whitelisted address as signatures are expected to be queried based on that address.Notes:
How this was tested
Manual and unit tests