Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ChainSafe/Multix into tbaut-walletc…
Browse files Browse the repository at this point in the history
…onnect
  • Loading branch information
Tbaut committed Sep 5, 2023
2 parents 179e233 + 5444fbd commit aba72c9
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-squid-aquarium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
deploy:
strategy:
matrix:
network: ['large', 'khala']
network: ['large']
runs-on: ubuntu-latest
defaults:
run:
Expand Down
17 changes: 13 additions & 4 deletions packages/ui/src/components/Transactions/TransactionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PendingTx, usePendingTx } from '../../hooks/usePendingTx'
import { useMultiProxy } from '../../contexts/MultiProxyContext'
import { ApiPromise } from '@polkadot/api'
import { useApi } from '../../contexts/ApiContext'
import { getDifference, getDisplayArgs, getIntersection } from '../../utils'
import { getDifference, getDisplayArgs, getIntersection, isProxyCall } from '../../utils'
import { useAccounts } from '../../contexts/AccountsContext'
import { ISanitizedCall, parseGenericCall } from '../../utils'
import { GenericCall } from '@polkadot/types'
Expand Down Expand Up @@ -163,11 +163,20 @@ const TransactionList = ({ className }: Props) => {

Promise.all(agregatedDataPromise)
.then((res) => {
const filtered = res.filter((agg) => agg !== undefined) as AggregatedData[]
const definedTxs = res.filter((agg) => agg !== undefined) as AggregatedData[]
const timestampObj: AggGroupedByDate = {}

// remove the proxy transaction that aren't for the selected proxy
const relevantTxs = definedTxs.filter((agg) => {
if (!isProxyCall(agg.name) || !agg?.args || !(agg.args as any).real.Id) {
return true
}

return (agg.args as any).real.Id === selectedMultiProxy?.proxy
})

// sort by date, the newest first
const sorted = filtered.sort(sortByLatest)
const sorted = relevantTxs.sort(sortByLatest)

// populate the object
sorted.forEach((data) => {
Expand All @@ -179,7 +188,7 @@ const TransactionList = ({ className }: Props) => {
setAggregatedData(timestampObj)
})
.catch(console.error)
}, [api, pendingTxData, selectedMultiProxy])
}, [aggregatedData.args, api, pendingTxData, selectedMultiProxy])

return (
<Box className={className}>
Expand Down
1 change: 0 additions & 1 deletion packages/ui/src/components/select/MultiProxySelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const MultiProxySelection = ({ className }: Props) => {
const ref = useRef<HTMLInputElement>(null)
const { multiProxyList, selectedMultiProxy, selectMultiProxy, isLoading } = useMultiProxy()
const isSelectedProxy = useMemo(() => !!selectedMultiProxy?.proxy, [selectedMultiProxy])
const { api } = useApi()
// We only support one multisigs if they have no proxy
const addressToShow = useMemo(
() => selectedMultiProxy?.proxy || selectedMultiProxy?.multisigs[0].address,
Expand Down
64 changes: 32 additions & 32 deletions packages/ui/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,128 +37,128 @@ export const networkList = {
chainId: 'polkadot',
explorerNetworkName: 'polkadot',
rpcUrl: 'wss://rpc.polkadot.io',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: chainsPolkadotCircleSVG
} as NetworkInfo,
kusama: {
chainId: 'kusama',
explorerNetworkName: 'kusama',
rpcUrl: 'wss://kusama-rpc.polkadot.io',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: chainsKusamaSVG
} as NetworkInfo,
'assethub-dot': {
chainId: 'assethub-polkadot',
explorerNetworkName: 'assethub-polkadot',
rpcUrl: 'wss://polkadot-asset-hub-rpc.polkadot.io',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: nodesAssetHubSVG
} as NetworkInfo,
'assethub-ksm': {
chainId: 'assethub-kusama',
explorerNetworkName: 'assethub-kusama',
rpcUrl: 'wss://kusama-asset-hub-rpc.polkadot.io',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: nodesAssetHubSVG
} as NetworkInfo,
acala: {
chainId: 'acala',
explorerNetworkName: 'acala',
rpcUrl: 'wss://acala-rpc-3.aca-api.network/ws',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: chainsAcalaSVG
} as NetworkInfo,
// amplitude: {
// chainId: 'amplitude',
// explorerNetworkName: 'amplitude',
// rpcUrl: 'wss://rpc-amplitude.pendulumchain.tech',
// wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
// httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
// wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
// httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
// logo: chainsAmplitudeSVG
// } as NetworkInfo,
astar: {
chainId: 'astar',
explorerNetworkName: 'astar',
rpcUrl: 'wss://rpc.astar.network',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: nodesAstarPNG
} as NetworkInfo,
'bifrost-dot': {
chainId: 'bifrost-polkadot',
explorerNetworkName: 'bifrost',
rpcUrl: 'wss://bifrost-polkadot.api.onfinality.io/public-ws',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: nodesBifrostSVG
} as NetworkInfo,
hydradx: {
chainId: 'hydradx',
explorerNetworkName: 'hydradx',
rpcUrl: 'wss://hydradx-rpc.dwellir.com',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: hydradxSVG
} as NetworkInfo,
interlay: {
chainId: 'interlay',
explorerNetworkName: 'interlay',
rpcUrl: 'wss://interlay.api.onfinality.io/public-ws',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: nodesInterlaySVG
} as NetworkInfo,
khala: {
chainId: 'khala',
explorerNetworkName: 'khala',
rpcUrl: 'wss://khala-api.phala.network/ws',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-khala/v/v1/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-khala/v/v1/graphql',
wsGraphqlUrl: 'wss:///squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https:///squid.subsquid.io/multix-large/v/v5/graphql',
logo: nodesKhalaSVG
} as NetworkInfo,
// pendulum: {
// chainId: 'pendulum',
// explorerNetworkName: 'pendulum',
// rpcUrl: 'wss://rpc-pendulum.prd.pendulumchain.tech',
// wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
// httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
// wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
// httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
// logo: chainsPendulumSVG
// } as NetworkInfo,
phala: {
chainId: 'phala',
explorerNetworkName: 'phala',
rpcUrl: 'wss://api.phala.network/ws',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: phalaSVG
} as NetworkInfo,
'rhala testnet': {
chainId: 'rhala',
explorerNetworkName: '',
rpcUrl: 'wss://subbridge-test.phala.network/rhala/ws',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: nodesKhalaSVG
} as NetworkInfo,
rococo: {
chainId: 'rococo',
explorerNetworkName: 'rococo',
rpcUrl: 'wss://rococo-rpc.polkadot.io',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
logo: chainsRococoSVG
} as NetworkInfo,
// westend: {
// chainId: 'westend',
// explorerNetworkName: 'westend',
// rpcUrl: 'wss://westend-rpc.polkadot.io',
// wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v4/graphql',
// httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v4/graphql',
// wsGraphqlUrl: 'wss://squid.subsquid.io/multix-large/v/v5/graphql',
// httpGraphqlUrl: 'https://squid.subsquid.io/multix-large/v/v5/graphql',
// logo: nodesWestendColourSVG
// } as NetworkInfo,
local: {
Expand Down
28 changes: 0 additions & 28 deletions squid/squid-manifests/khala-squid.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions squid/squid-manifests/large-squid.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
manifestVersion: subsquid.io/v0.1
name: multix-large
version: 4
version: 5
description: |-
Squid for Multix
Expand Down Expand Up @@ -34,6 +34,8 @@ deploy:
cmd: ['sqd', 'start-astar']
- name: hydradx-processor
cmd: ['sqd', 'start-hydradx']
- name: khala-processor
cmd: ['sqd', 'start-khala']
# - name: pendulum-processor
# cmd: ['sqd', 'start-pendulum']
# - name: amplitude-processor
Expand All @@ -46,7 +48,6 @@ scale:
dedicated: true
addons:
postgres:
# storage: 100Gi
profile: small
processor:
profile: small
Expand Down

0 comments on commit aba72c9

Please sign in to comment.