Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @sxlwar @carlhong
* @sxlwar @carlhong @vzxh
46 changes: 46 additions & 0 deletions .github/workflows/backup/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy develop

on:
pull_request:

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
with:
repository: itering/actions
path: .github/actions
persist-credentials: false
ssh-key: '${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}'

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
id: smart-vercel
with:
node_version: 14
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
script_install: npm i
script_build: npm run build
alias_domain: multisig-dev

- uses: marocchino/sticky-pull-request-comment@v2
with:
append: true
message: ${{ steps.smart-vercel.outputs.PREVIEW_OUTPUT }}

# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: subscan-general
# SLACK_COLOR: ${{ job.status }}
# SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
# SLACK_MESSAGE: '${{ steps.smart-vercel.outputs.PREVIEW_LINK }}'
# SLACK_TITLE: Preview
# SLACK_USERNAME: Vercel
# SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
42 changes: 42 additions & 0 deletions .github/workflows/backup/deploy-stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy staging

on:
push:
branches: [master]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
with:
repository: itering/actions
path: .github/actions
persist-credentials: false
ssh-key: '${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}'

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
id: smart-vercel
with:
node_version: 14
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
script_install: npm i
script_build: npm run build
alias_domain: multisig-staging

- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: subscan-multisig-notification
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
SLACK_MESSAGE: '${{ steps.smart-vercel.outputs.PREVIEW_LINK }}'
SLACK_TITLE: Preview
SLACK_USERNAME: Vercel
SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
43 changes: 43 additions & 0 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy production

on:
push:
tags:
- 'v*'

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
with:
repository: itering/actions
path: .github/actions
persist-credentials: false
ssh-key: '${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}'

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
id: smart-vercel
with:
node_version: 14
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
prod_mode: true
script_install: npm i
script_build: npm run build

- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: subscan-multisig-notification
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
SLACK_MESSAGE: '${{ steps.smart-vercel.outputs.PREVIEW_LINK }}'
SLACK_TITLE: Preview
SLACK_USERNAME: Vercel
SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
13 changes: 8 additions & 5 deletions .github/workflows/multisig-production-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: multisig-production-deploy

on:
push:
branches:
- sync-latest-upstream-code
workflow_dispatch:

env:
AWS_S3_BUCKET_NAME: multisig-production
AWS_S3_BUCKET_NAME: parallel-multisig-production
AWS_REGION: us-east-2
AWS_CLOUDFRONT_DISTRIBUTION_ID: EOE2FT3RXE5GE
CLOUDFLARE_PURGE_URLS: '["https://multisig.parallel.fi/"]'
Expand All @@ -13,10 +16,10 @@ jobs:
deploy:
name: Deploy to S3
runs-on: ubuntu-latest
if: |
github.event.sender.id == 78835349 ||
github.event.sender.id == 13250462 ||
github.event.sender.id == 12026976
# if: |
# github.event.sender.id == 78835349 ||
# github.event.sender.id == 13250462 ||
# github.event.sender.id == 12026976
# github.event.sender.id=Carlos Yvan Andrew
steps:
- uses: actions/checkout@v2
Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This is a React-rewrite of previous Vue [implementation](https://github.com/iter

- [Feature](#Feature)
- [Tutorial](#Tutorial)
- [Integration](#Integration)
- [QuickStart](#QuickStart)
- [Requirement](#Requirement)
- [Installation](#Install)
Expand Down Expand Up @@ -152,6 +153,43 @@ Only the initiator has the authority to cancel the multi-sig extrinsic. Click "C
<img src="./docs/12_cancel.png" style="width:800px";>
</p>

## Integration

### Add your own network in supported network list

#### 1.Write your network config file

All networks are configured in `src/config/chains` folder, You can take `polkadot.json` as an exmaple:

```
{
"name": "polkadot",
"displayName": "Polkadot",
"rpc": "wss://rpc.polkadot.io",
// Optional (Delete this line in PR!)
"api": {
"subql": "https://api.subquery.network/sq/itering/multisig-polkadot"
},
"logo": "/image/polkadot-button-mobile.png",
// Optional (Delete this line in PR!)
"explorerHostName": "polkadot",
"themeColor": "#e6007a"
}
```

#### 2.Make a PR to submit your network

After completing the above json config file, you can place it under `src/config/chains`, and submit a PR targeting `master` branch, once it's approved, multisig APP will display your network in the list.

<p align="center">
<img src="./docs/13_select_network.png" style="width:800px";>
</p>

#### 3.Deploy your own subquery endpoint (optional)

In order to support advanced features such as transaction history, you need to deploy your own [subquery](https://doc.subquery.network/) endpoint, and add it to the json file above.
You can fork from the [subscan multisig subquery repo](https://github.com/subscan-explorer/subscan-multisig-subql) and add support for your network.

## QuickStart

### Requirement
Expand Down
28 changes: 28 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const lightVars = {
};
const { alias, configPaths } = require('react-app-rewire-alias');

const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');

// just for dev purpose, use to compare vars in different theme.
// fs.writeFileSync('./ant-theme-vars/dark.json', JSON.stringify(darkVars));
// fs.writeFileSync('./ant-theme-vars/light.json', JSON.stringify(lightVars));
Expand Down Expand Up @@ -84,9 +86,35 @@ module.exports = {
webpack: {
plugins: {
add: [themePlugin],
// add: [themePlugin, new BundleAnalyzerPlugin({ analyzerPort: 8919 })],
},
// .
// add mjs compatibility configuration
configure: (webpackConfig) => {
webpackConfig.optimization.splitChunks = {
...webpackConfig.optimization.splitChunks,
chunks: 'all',
minSize: 1000000,
maxSize: 5000000,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
priority: -10,
name(module) {
// get the name. E.g. node_modules/packageName/not/this/part.js
// or node_modules/packageName
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
// npm package names are URL-safe, but some servers don't like @ symbols
return `npm.${packageName.replace('@', '')}`;
},
},
default: {
minChunks: 2,
priority: -20,
reuseExistingChunk: true,
},
},
};
webpackConfig.module.rules.push({
test: /\.mjs$/,
include: /node_modules/,
Expand Down
Binary file modified docs/10_approve.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/11_progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/12_cancel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/13_select_network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/1_download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/2_auth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/3_create_wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/4_add_members.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/5_view_members.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/6_enter_detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/7_account_ops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/8_initial_extrinsic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/9_pending.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/btn_detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/btn_member.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/btn_pending.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading