-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
afe0759
commit a662f43
Showing
20 changed files
with
242 additions
and
255 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
presets: ['@vue/cli-plugin-babel/preset'] | ||
presets: ['@vue/cli-plugin-babel/preset'], | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
const { defineConfig } = require("cypress"); | ||
const synpressPlugins = require("@synthetixio/synpress/plugins"); | ||
const { defineConfig } = require('cypress') | ||
const synpressPlugins = require('@synthetixio/synpress/plugins') | ||
|
||
module.exports = defineConfig({ | ||
projectId: "2p7qw6", | ||
userAgent: "synpress", | ||
chromeWebSecurity: true, | ||
defaultCommandTimeout: 30000, | ||
pageLoadTimeout: 30000, | ||
requestTimeout: 30000, | ||
e2e: { | ||
testIsolation: true, | ||
setupNodeEvents(on, config) { | ||
synpressPlugins(on, config); | ||
}, | ||
baseUrl: "http://localhost:8080", | ||
supportFile: "tests/support/e2e.ts", | ||
specPattern: "tests/e2e/**/*.spec.{js,jsx,ts,tsx}", | ||
}, | ||
}); | ||
projectId: '2p7qw6', | ||
userAgent: 'synpress', | ||
chromeWebSecurity: true, | ||
defaultCommandTimeout: 30000, | ||
pageLoadTimeout: 30000, | ||
requestTimeout: 30000, | ||
e2e: { | ||
testIsolation: true, | ||
setupNodeEvents(on, config) { | ||
synpressPlugins(on, config) | ||
}, | ||
baseUrl: 'http://localhost:8080', | ||
supportFile: 'tests/support/e2e.ts', | ||
specPattern: 'tests/e2e/**/*.spec.{js,jsx,ts,tsx}', | ||
}, | ||
}) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { ethers } from "ethers" | ||
import { ethers } from 'ethers' | ||
|
||
type ClaimRequest = { | ||
banAddress: string | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
type GaslessSettings = { | ||
enabled: boolean, | ||
swapAllowed: boolean, | ||
banThreshold: number, | ||
cryptoThreshold: number, | ||
swapContract: string, | ||
enabled: boolean | ||
swapAllowed: boolean | ||
banThreshold: number | ||
cryptoThreshold: number | ||
swapContract: string | ||
} | ||
|
||
export { GaslessSettings } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { Web3Provider } from "@ethersproject/providers"; | ||
import { Web3Provider } from '@ethersproject/providers' | ||
|
||
declare type Permit = { | ||
amount: string; // amount of wBAN to swap | ||
deadline: number; // permit deadline | ||
signature: string; // Permit signature to spend wBAN | ||
}; | ||
amount: string // amount of wBAN to swap | ||
deadline: number // permit deadline | ||
signature: string // Permit signature to spend wBAN | ||
} | ||
|
||
declare type GaslessSwapRequest = { | ||
banWallet: string; | ||
recipient: string; // blockchain address of the user requesting the gasless swap | ||
permit: Permit; | ||
gasLimit: number; | ||
swapCallData: string; // the 0x `data` field from the API response | ||
banWallet: string | ||
recipient: string // blockchain address of the user requesting the gasless swap | ||
permit: Permit | ||
gasLimit: number | ||
swapCallData: string // the 0x `data` field from the API response | ||
provider: Web3Provider | ||
}; | ||
} | ||
|
||
export { GaslessSwapRequest }; | ||
export { GaslessSwapRequest } |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
describe("Auto Reconnect Web3 Wallet", () => { | ||
const banAddy = 'ban_1burnbabyburndiscoinferno111111111111111111111111111aj49sw3w'; | ||
describe('Auto Reconnect Web3 Wallet', () => { | ||
const banAddy = 'ban_1burnbabyburndiscoinferno111111111111111111111111111aj49sw3w' | ||
|
||
afterEach(() => { | ||
cy.disconnectMetamaskWalletFromAllDapps(); | ||
cy.disconnectMetamaskWalletFromAllDapps() | ||
//cy.resetMetamaskAccount(); | ||
}); | ||
}) | ||
|
||
it("Should automatically reconnect wallet when reloading main page", () => { | ||
cy.login(banAddy, 'ethereum'); | ||
it('Should automatically reconnect wallet when reloading main page', () => { | ||
cy.login(banAddy, 'ethereum') | ||
// we should be on home page with wBAN statistics displayed | ||
cy.contains('wBAN Statistics'); | ||
cy.contains('wBAN Statistics') | ||
|
||
// reload page | ||
cy.reload(); | ||
cy.reload() | ||
|
||
// we should still be on the main page | ||
cy.contains('wBAN Statistics'); | ||
}); | ||
cy.contains('wBAN Statistics') | ||
}) | ||
|
||
it("Should automatically reconnect wallet when reloading farms page", () => { | ||
cy.login(banAddy, 'ethereum'); | ||
it('Should automatically reconnect wallet when reloading farms page', () => { | ||
cy.login(banAddy, 'ethereum') | ||
// we should be on home page with wBAN statistics displayed | ||
cy.contains('wBAN Statistics'); | ||
cy.contains('wBAN Statistics') | ||
|
||
// let's go to farms page | ||
cy.findByText(/Stake & farm/i).click(); | ||
cy.contains('wBAN Earned'); | ||
cy.findByText(/Stake & farm/i).click() | ||
cy.contains('wBAN Earned') | ||
|
||
// reload page | ||
cy.reload(); | ||
cy.reload() | ||
|
||
// we should still be on the main page | ||
cy.contains('wBAN Earned'); | ||
}); | ||
}); | ||
cy.contains('wBAN Earned') | ||
}) | ||
}) |
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
Oops, something went wrong.