Skip to content

Commit

Permalink
Merge branch 'dev' into feat/simplify-task-creation
Browse files Browse the repository at this point in the history
  • Loading branch information
msarcev authored Jan 19, 2024
2 parents e9d5950 + e478172 commit 42c11a7
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 11 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pr-build-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PR build check

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
build-check:
strategy:
fail-fast: false
matrix:
project: [api, client]
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.project }}
steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "16"

- name: Install Dependencies
run: npm install

- name: Build Check
run: npm run build
4 changes: 0 additions & 4 deletions .husky/pre-push

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ const AssetsTable: React.FC<AssetsTableProps> = ({ networkId, outputs, setTokenC
) {
for (const token of (output as CommonOutput).nativeTokens ?? []) {
const existingToken = theTokens.find((t) => t.id === token.id);
// Convert to BigInt again in case the amount is hex
const amount = BigInt(token.amount);
if (existingToken) {
existingToken.amount += token.amount;
existingToken.amount += amount;
} else {
theTokens.push({ id: token.id, amount: token.amount });
theTokens.push({ id: token.id, amount });
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const TokenInfoSection: React.FC<TokenInfoSectionProps> = ({ tokenId, tokenSchem

const simpleTokenScheme = tokenScheme as SimpleTokenScheme;

const maximumSupply = formatNumberWithCommas(simpleTokenScheme.maximumSupply);
const mintedTokens = formatNumberWithCommas(simpleTokenScheme.mintedTokens);
const meltedTokens = formatNumberWithCommas(simpleTokenScheme.meltedTokens);
const maximumSupply = formatNumberWithCommas(BigInt(simpleTokenScheme.maximumSupply));
const mintedTokens = formatNumberWithCommas(BigInt(simpleTokenScheme.mintedTokens));
const meltedTokens = formatNumberWithCommas(BigInt(simpleTokenScheme.meltedTokens));

return (
<div className="token-info">
Expand Down
8 changes: 7 additions & 1 deletion client/src/services/identityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { CHRYSALIS, STARDUST } from "~models/config/protocolVersion";
import * as identity from "@iota/identity-wasm/web";

export class IdentityService {
private initLibraryPromise: Promise<void> | undefined;

/**
* Resolves DID into it's DID document (Chrysalis).
* @param {string} did DID to be resolved
Expand Down Expand Up @@ -66,6 +68,10 @@ export class IdentityService {
}

public async initLibrary(path = "/wasm/identity_wasm_bg.wasm") {
return await identity.init(path);
if (!this.initLibraryPromise) {
this.initLibraryPromise = identity.init(path);
}

return this.initLibraryPromise;
}
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"setup:dev": "npm run clear && npm run prepare && npm run setup:client && npm run setup:api",
"clear": "rimraf api/node_modules api/dist client/node_modules client/build",
"dev": "concurrently 'cd api && npm run start-dev' 'cd client && npm run start'",
"pre-push": "concurrently 'cd api && npm run build-compile && npm run build-lint && npm run build-config' 'cd client && npm run build'",
"prepare": "husky install",
"format": "concurrently 'cd api && npm run format' 'cd client && npm run format'"
},
Expand Down

0 comments on commit 42c11a7

Please sign in to comment.