Skip to content

Commit

Permalink
feat: workflow added
Browse files Browse the repository at this point in the history
  • Loading branch information
mikarasv committed Jan 11, 2024
1 parent 21e74a7 commit 3ab616d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Check

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20.3.1

- name: Install dependencies
run: npm install

- name: Build
run: npm run build || exit 1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"build": "next build || exit 1",
"db:push": "prisma db push",
"db:studio": "prisma studio",
"dev": "next dev",
Expand Down
6 changes: 4 additions & 2 deletions src/components/WalletWidget/Balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ export const Balance = () => {
}
};

const balanceInt = Math.floor(Number(intToDecimal(balance, 6)));
const decimals: string = 6;

const balanceInt = Math.floor(Number(intToDecimal(balance, decimals)));

const balanceDecimals = Number(
balance - (decimalToInt(BigInt(balanceInt), 6) as bigint),
balance - (decimalToInt(BigInt(balanceInt), decimals) as bigint),
);

return (
Expand Down

0 comments on commit 3ab616d

Please sign in to comment.