Skip to content
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

Fix faucet limitation #571

Merged
merged 1 commit into from
Sep 15, 2022
Merged

Fix faucet limitation #571

merged 1 commit into from
Sep 15, 2022

Conversation

samuelmanzanera
Copy link
Member

Description

Fix the limitation of the faucet

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Request funds more than 3 times on the same genesis address should be prevented

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@samuelmanzanera samuelmanzanera added bug Something isn't working UI Invole user interface labels Sep 14, 2022
@@ -9,6 +9,8 @@ defmodule ArchethicWeb.FaucetControllerTest do
PubSub
}

alias Archethic.BeaconChain.ReplicationAttestation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alias Archethic.{
BeaconChain.ReplicationAttestation,??
Crypto,
P2P,
P2P.Node,
PubSub
}

Comment on lines 15 to 16
alias ArchethicWeb.TransactionSubscriber
alias ArchethicWeb.FaucetRateLimiter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alias ArchethicWeb.{TransactionSubscriber,FaucetRateLimiter}??

Copy link
Contributor

@apoorv-2204 apoorv-2204 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍 works for me.

@@ -50,7 +53,12 @@ defmodule ArchethicWeb.FaucetControllerTest do

describe "create_transfer/2" do
test "should show success flash with tx URL on valid transaction", %{conn: conn} do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MockCrypto.get_storage_nonce/0 ?? Maybe we can have this , for more deterministic test?
Call to TransactionSubscriber.get_max_confirmations requires storage nonce?I am not sure,
it may require more Mocks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the point to avoid blocking address , so if any address is not used it should not be blocked like the next test

@samuelmanzanera samuelmanzanera merged commit acfde88 into develop Sep 15, 2022
@samuelmanzanera samuelmanzanera deleted the fix_faucet_limitation branch September 15, 2022 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI Invole user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants