Skip to content

Commit

Permalink
Merge branch 'main' into az/merge-voucher-and-squid-indexers
Browse files Browse the repository at this point in the history
  • Loading branch information
Zewasik committed Oct 4, 2024
2 parents 942d591 + 43e61fe commit c1cd978
Show file tree
Hide file tree
Showing 86 changed files with 2,586 additions and 564 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI-CD-Squid-Explorer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
with:
file: idea/explorer/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-explorer:${{ env.tag }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-explorer-latest:${{ env.tag }}

build-squid-image:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
with:
file: idea/squid/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-squid:${{ env.tag }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-squid-latest:${{ env.tag }}

deploy-to-k8s:
needs:
Expand All @@ -108,10 +108,10 @@ jobs:
run: |
if [ "${{ github.ref }}" == "refs/heads/idea-release" ]; then
echo "namespace=prod-idea" >> $GITHUB_ENV
echo "deployments=explorer squid-testnet squid-mainnet" >> $GITHUB_ENV
echo "deployments=explorer-latest squid-testnet-latest squid-mainnet-latest" >> $GITHUB_ENV
else
echo "namespace=dev-1" >> $GITHUB_ENV
echo "deployments=explorer squid-testnet" >> $GITHUB_ENV
echo "deployments=explorer-latest squid-testnet-latest" >> $GITHUB_ENV
fi
- name: Deploy to k8s
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/CI-CD-Wallet-Connect-Package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: 'CI-CD @gear-js/wallet-connect'

on:
pull_request:
branches: [main]
paths:
- utils/wallet-connect/**
push:
branches: [main]
paths:
- utils/wallet-connect/**
workflow_dispatch:

jobs:
wallet-connect-build:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel previous workflow runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2

- name: Install NodeJS 18.x
uses: actions/[email protected]
with:
node-version: 18.x

- name: 'wallet-connect: Install dependencies'
working-directory: utils/wallet-connect
run: yarn install

- name: 'vwallet-connect: Build pkg'
working-directory: utils/wallet-connect
run: yarn run build

publish-to-npm:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2

- name: Use node 18.x
uses: actions/[email protected]
with:
node-version: 18.x

- name: '@gear-js/wallet-connect: Check pkg version'
uses: EndBug/version-check@v1
id: check_gear
with:
file-name: utils/wallet-connect/package.json
file-url: https://unpkg.com/@gear-js/wallet-connect@latest/package.json
static-checking: localIsNew

- name: '@gear-js/wallet-connect: Publish'
working-directory: utils/wallet-connect
run: |
export token=$(printenv $(printenv GITHUB_ACTOR))
yarn install
npm run build
npm config set //registry.npmjs.org/:_authToken=$token --no-workspaces
npm publish
env:
osipov-mit: ${{ secrets.OSIPOV_NPM_TOKEN }}
nikitayutanov: ${{ secrets.YUTANOV_NPM_TOKEN }}
6 changes: 5 additions & 1 deletion idea/explorer/src/services/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ export class EventService {
}

@Pagination()
async getEvents({ source, service, name, limit, offset }: ParamGetEvents): Promise<ResManyResult<Event>> {
async getEvents({ source, parentId, service, name, limit, offset }: ParamGetEvents): Promise<ResManyResult<Event>> {
const builder = this._repo.createQueryBuilder('event');

if (source) {
builder.andWhere('event.source = :source', { source });
}

if (parentId) {
builder.andWhere('event.parent_id = :parentId', { parentId });
}

if (service) {
builder.andWhere('event.service ILIKE :service', { service: `%${service.toLowerCase()}%` });
}
Expand Down
5 changes: 5 additions & 0 deletions idea/explorer/src/services/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export class MessageService {
async getMsgsFrom({
source,
destination,
parentId,
isInMailbox,
limit,
offset,
Expand All @@ -105,6 +106,10 @@ export class MessageService {
qb.andWhere('msg.destination = :destination', { destination });
}

if (parentId) {
qb.andWhere('msg.parent_id = :parentId', { parentId });
}

if (isInMailbox) {
qb.andWhere('msg.readReson = NULL').andWhere('msg.expiration != NULL');
}
Expand Down
1 change: 1 addition & 0 deletions idea/explorer/src/types/requests/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export interface ParamGetEvents extends ParamPagination, ParamGenesis {
service?: string;
name?: string;
source?: string;
parentId?: string;
}
1 change: 1 addition & 0 deletions idea/explorer/src/types/requests/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class ParamGetMsgsToProgram extends ParamPagination {
export class ParamGetMsgsFromProgram extends ParamPagination {
readonly destination?: string;
readonly source?: string;
readonly parentId?: string;
readonly isInMailbox?: boolean;
readonly service?: string;
readonly fn?: string;
Expand Down
1 change: 1 addition & 0 deletions idea/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ COPY .yarn .yarn
COPY ./idea/frontend ./idea/frontend
COPY ./utils/gear-hooks ./utils/gear-hooks
COPY ./utils/gear-ui ./utils/gear-ui
COPY ./utils/wallet-connect ./utils/wallet-connect

RUN yarn install --mode=skip-build

Expand Down
3 changes: 2 additions & 1 deletion idea/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@gear-js/api": "0.38.1",
"@gear-js/react-hooks": "workspace:^",
"@gear-js/ui": "workspace:^",
"@gear-js/wallet-connect": "workspace:^",
"@hcaptcha/react-hcaptcha": "1.8.1",
"@hookform/resolvers": "3.3.2",
"@polkadot/api": "11.0.2",
Expand Down Expand Up @@ -66,7 +67,7 @@
"typescript": "5.5.3",
"vite": "4.4.11",
"vite-plugin-checker": "0.6.2",
"vite-plugin-node-polyfills": "0.15.0",
"vite-plugin-node-polyfills": "0.22.0",
"vite-plugin-svgr": "4.1.0"
}
}
9 changes: 0 additions & 9 deletions idea/frontend/src/features/wallet/assets/enkrypt.svg

This file was deleted.

11 changes: 0 additions & 11 deletions idea/frontend/src/features/wallet/assets/polkadot.svg

This file was deleted.

87 changes: 0 additions & 87 deletions idea/frontend/src/features/wallet/assets/subwallet.svg

This file was deleted.

11 changes: 0 additions & 11 deletions idea/frontend/src/features/wallet/assets/talisman.svg

This file was deleted.

17 changes: 0 additions & 17 deletions idea/frontend/src/features/wallet/consts.ts

This file was deleted.

3 changes: 0 additions & 3 deletions idea/frontend/src/features/wallet/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions idea/frontend/src/features/wallet/types.ts

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions idea/frontend/src/features/wallet/ui/account-button/index.ts

This file was deleted.

Loading

0 comments on commit c1cd978

Please sign in to comment.