Skip to content

Commit

Permalink
Iota stardust
Browse files Browse the repository at this point in the history
Fixes

Fixes

Fixes

Fixes

Fixes

Fixes

Fixes

Fixes

Fixes
  • Loading branch information
Boldizsar Mezei committed Oct 3, 2023
1 parent 3afe9b3 commit d652273
Show file tree
Hide file tree
Showing 186 changed files with 2,492 additions and 3,181 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/functions_tangle-online-unit-tests_emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1460,9 +1460,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_1_b.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_10.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_1.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_7.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_1.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1497,9 +1497,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_7.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_6.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_5.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_4.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_5.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1534,9 +1534,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_4.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_3.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_2.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_1.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_2.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1571,7 +1571,7 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/db-roll/credit.highest.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_1.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_9.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_8.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
Expand Down Expand Up @@ -1831,8 +1831,8 @@ jobs:
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_1.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_6.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_5.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_7.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_6.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1867,9 +1867,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_5.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_4.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_3.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_2.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_3.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1904,9 +1904,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_2.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_1.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_9.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_8.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_9.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1941,9 +1941,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_8.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_7.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_6.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_5.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_6.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1978,9 +1978,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_5.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_4.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_3.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_2.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_3.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -2015,6 +2015,7 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_2.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_10.spec.ts &&
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_1.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
Expand Down
35 changes: 18 additions & 17 deletions .github/workflows/functions_tangle-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1458,9 +1458,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_1_b.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_10.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_1.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_7.spec.ts
npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_1.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1495,9 +1495,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_7.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_6.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_5.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_4.spec.ts
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_5.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1532,9 +1532,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_4.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_3.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_2.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_1.spec.ts
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_2.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1569,7 +1569,7 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/db-roll/credit.highest.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_1.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_9.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_8.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
Expand Down Expand Up @@ -1829,8 +1829,8 @@ jobs:
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_1.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_6.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_5.spec.ts
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_7.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_6.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1865,9 +1865,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_5.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_4.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_3.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_2.spec.ts
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_3.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1902,9 +1902,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_2.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_1.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_9.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_8.spec.ts
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_9.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1939,9 +1939,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_8.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_7.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_6.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_5.spec.ts
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_6.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1976,9 +1976,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_5.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_4.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_3.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_2.spec.ts
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_3.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -2013,6 +2013,7 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_2.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_10.spec.ts &&
npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_1.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"joi-to-types": "ts-node ./scripts/joi-generator-post.ts && ts-node ./scripts/joi-generator-tangle.ts && npm run prettier"
},
"devDependencies": {
"joi-to-typescript": "^4.4.1"
"joi-to-typescript": "4.7.0"
}
}
6 changes: 3 additions & 3 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"cors": "^2.8.5",
"dayjs": "^1.11.9",
"express": "^4.18.2",
"joi": "^17.10.1",
"joi": "17.10.2",
"lodash": "^4.17.21",
"rxjs": "^7.8.1",
"ws": "^8.13.0",
"@iota/iota.js-next": "npm:@iota/[email protected]",
"@iota/util.js-next": "npm:@iota/[email protected]"
"@iota/iota.js": "npm:@iota/[email protected]",
"@iota/util.js": "npm:@iota/[email protected]"
},
"devDependencies": {
"@types/express": "^4.17.17",
Expand Down
17 changes: 2 additions & 15 deletions packages/api/src/getTopMilestones.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { build5Db } from '@build-5/database';
import { COL, Network } from '@build-5/interfaces';
import { Network, getMilestoneCol } from '@build-5/interfaces';
import { combineLatest, map } from 'rxjs';
import { queryToObservable } from './common';

Expand All @@ -11,17 +11,4 @@ export const getTopMilestones = async (_: string) => {
};

const networkToQuery = (network: Network) =>
build5Db().collection(getMilestoneColForNetwrok(network)).orderBy('createdOn', 'desc').limit(1);

const getMilestoneColForNetwrok = (network: Network) => {
switch (network) {
case Network.IOTA:
return COL.MILESTONE;
case Network.ATOI:
return COL.MILESTONE_ATOI;
case Network.SMR:
return COL.MILESTONE_SMR;
case Network.RMS:
return COL.MILESTONE_RMS;
}
};
build5Db().collection(getMilestoneCol(network)).orderBy('createdOn', 'desc').limit(1);
Loading

0 comments on commit d652273

Please sign in to comment.