-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #578 from Magickbase/develop
Merge develop into master
- Loading branch information
Showing
105 changed files
with
30,913 additions
and
24,154 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 |
---|---|---|
|
@@ -4,72 +4,60 @@ on: | |
schedule: | ||
- cron: '0 0 * * *' | ||
push: | ||
branches: | ||
- 'develop' | ||
- 'staging' | ||
- 'v**' | ||
pull_request: | ||
|
||
jobs: | ||
e2e_tests: | ||
if: false | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: 16 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v3 | ||
- name: Cypress install | ||
uses: cypress-io/github-action@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
runTests: false | ||
|
||
- name: Cache cypress binary | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/Cypress | ||
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
cypress-${{ runner.os }}-cypress- | ||
- name: Bootstrap | ||
env: | ||
CI: 1 | ||
run: | | ||
npm ci | ||
npx cypress verify | ||
npx cypress info | ||
npx cypress version | ||
npx cypress version --component package | ||
npx cypress version --component binary | ||
npx cypress version --component electron | ||
npx cypress version --component node | ||
- name: Cypress info | ||
run: npx cypress info | ||
|
||
- name: Test | ||
run: npm run test:e2e | ||
- name: Cypress run | ||
uses: cypress-io/[email protected] | ||
with: | ||
install: false | ||
build: npm run build | ||
start: npm start | ||
wait-on: 'http://localhost:3000' | ||
wait-on-timeout: 120 | ||
config-file: cypress.json | ||
command: npm run cypress:run | ||
env: | ||
NEXT_PUBLIC_SERVER_ENDPOINT: ${{ secrets.NEXT_PUBLIC_SERVER_ENDPOINT }} | ||
NEXT_PUBLIC_SERVER_URL: ${{ secrets.NEXT_PUBLIC_SERVER_URL }} | ||
NEXT_PUBLIC_SERVER_ENDPOINT: ${{ secrets.NEXT_PUBLIC_SERVER_ENDPOINT_FOR_E2E }} | ||
NEXT_PUBLIC_WS_URL: ${{ secrets.NEXT_PUBLIC_WS_URL }} | ||
NEXT_PUBLIC_CHAIN_TYPE: ${{ secrets.NEXT_PUBLIC_CHAIN_TYPE }} | ||
|
||
- name: Upload screenshots | ||
uses: actions/upload-artifact@master | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: screenshots | ||
name: cypress-screenshots | ||
path: cypress/screenshots | ||
if-no-files-found: ignore | ||
|
||
- name: Upload videos | ||
uses: actions/upload-artifact@master | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: videos | ||
name: cypress-videos | ||
path: cypress/videos | ||
|
||
- name: Upload Codecov | ||
uses: codecov/codecov-action@v1 | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import BigNumber from 'bignumber.js' | ||
|
||
const BaseAmount: React.FC<{ amount: string; udt: { decimal: number; symbol: string }; showSymbol?: boolean }> = ({ | ||
amount, | ||
udt: { decimal, symbol }, | ||
showSymbol = false, | ||
}) => { | ||
const a = new BigNumber(amount ?? 0).dividedBy(10 ** decimal).toFormat() | ||
const [rInt, rFrac] = a.split('.') | ||
const unit = symbol?.split('.')[0] ?? '' | ||
return ( | ||
<b style={{ whiteSpace: 'nowrap', fontWeight: 500 }}> | ||
<span>{rInt}</span> | ||
{rFrac ? <span style={{ color: 'var(--amount-frac-color)' }}>{`.${rFrac}`}</span> : null} | ||
{showSymbol ? ` ${unit}` : null} | ||
</b> | ||
) | ||
} | ||
|
||
BaseAmount.displayName = 'Amount' | ||
|
||
export default BaseAmount |
Oops, something went wrong.
33e9620
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
godwoken-explorer-ui – ./
v1.aggron.gwscan.com
godwoken-explorer-ui.vercel.app
godwoken-explorer-ui-git-master-magickbase.vercel.app
godwoken-explorer-ui-magickbase.vercel.app
aggron.gwscan.com