Skip to content

Commit

Permalink
Merge pull request #822 from blockscout/ll-fix-blockscout-auth
Browse files Browse the repository at this point in the history
Update blockscout-auth path to v2
  • Loading branch information
sevenzing authored Apr 4, 2024
2 parents 9179a24 + b906b89 commit 3d7397f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libs/blockscout-auth/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub async fn auth_from_tokens(
blockscout_api_key: Option<&str>,
) -> Result<AuthSuccess, Error> {
let mut url = blockscout_host
.join("/api/account/v1/authenticate")
.join("/api/account/v2/authenticate")
.expect("should be valid url");
url.set_query(
blockscout_api_key
Expand Down
2 changes: 1 addition & 1 deletion libs/blockscout-auth/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub async fn init_mocked_blockscout_auth_service(
users: &[MockUser],
) -> MockServer {
let mock_server = MockServer::start().await;
let url = "/api/account/v1/authenticate".to_string();
let url = "/api/account/v2/authenticate".to_string();

for user in users {
let mut mock = Mock::given(method("GET"))
Expand Down
9 changes: 4 additions & 5 deletions libs/sourcify/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,11 @@ mod tests {
.expect_err("error expected");
assert!(
matches!(
result,
Error::Sourcify(SourcifyError::Custom(
VerifyFromEtherscanError::ContractNotVerified(_)
))
&result,
Error::Sourcify(SourcifyError::NotFound(message))
if message.contains("not verified on Etherscan")
),
"expected: 'SourcifyError::ContractNotVerified', got: {result:?}"
"expected: 'SourcifyError::NotFound with not verified on etherscan message', got: {result:?}"
);
}

Expand Down

0 comments on commit 3d7397f

Please sign in to comment.