Skip to content

Commit

Permalink
fix(platforms): mark gtc staking as evm (passportxyz#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Schultz authored May 1, 2023
1 parent 9f3d35c commit ed57d9e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions platforms/src/GnosisSafe/Providers/__tests__/gnosisSafe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("Verification succeeds", function () {

// Check the request to get the NFTs
expect(axios.get).toHaveBeenCalledTimes(1);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes`);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes/`);

expect(gnosisSafePayload).toEqual({
valid: true,
Expand Down Expand Up @@ -65,7 +65,7 @@ describe("Verification fails", function () {

// Check the request to get the NFTs
expect(axios.get).toHaveBeenCalledTimes(1);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes`);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes/`);

expect(gnosisSafePayload).toEqual({
valid: false,
Expand All @@ -88,7 +88,7 @@ describe("Verification fails", function () {

// Check the request to get the NFTs
expect(axios.get).toHaveBeenCalledTimes(1);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes`);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes/`);

expect(gnosisSafePayload).toEqual({
valid: false,
Expand All @@ -115,7 +115,7 @@ describe("Verification fails", function () {

// Check the request to get the NFTs
expect(axios.get).toHaveBeenCalledTimes(1);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes`);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes/`);

expect(gnosisSafePayload).toEqual({
valid: false,
Expand All @@ -135,7 +135,7 @@ describe("Verification fails", function () {

// Check the request to get the NFTs
expect(axios.get).toHaveBeenCalledTimes(1);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes`);
expect(mockedAxios.get).toBeCalledWith(`${gnosisSafeApiEndpoint}owners/${MOCK_ADDRESS}/safes/`);

expect(gnosisSafePayload).toEqual({
valid: false,
Expand Down
4 changes: 2 additions & 2 deletions platforms/src/GnosisSafe/Providers/gnosisSafe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import axios from "axios";
import { getAddress } from "../../utils/signer";

// https://safe-transaction.gnosis.io/
export const gnosisSafeApiEndpoint = "https://safe-transaction.gnosis.io/api/v1/";
export const gnosisSafeApiEndpoint = "https://safe-transaction-mainnet.safe.global/api/v1/";

type OwnerSafesResponse = {
safes: string[];
Expand Down Expand Up @@ -62,7 +62,7 @@ export class GnosisSafeProvider implements Provider {
}

const getSafes = async (address: string): Promise<OwnerSafesResponse> => {
const requestResponse = await axios.get(`${gnosisSafeApiEndpoint}owners/${address}/safes`);
const requestResponse = await axios.get(`${gnosisSafeApiEndpoint}owners/${address}/safes/`);

if (requestResponse.status != 200) {
throw [`HTTP Error '${requestResponse.status}'. Details: '${requestResponse.statusText}'.`];
Expand Down
1 change: 1 addition & 0 deletions platforms/src/GtcStaking/App-Bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { AppContext, Platform, PlatformOptions, ProviderPayload } from "../types
export class GTCStakingPlatform implements Platform {
platformId = "GtcStaking";
path = "";
isEVM = true;
clientId: string = null;
redirectUri: string = null;

Expand Down

0 comments on commit ed57d9e

Please sign in to comment.