fix: multisig signer when "any rpc" is selected (#184)

* chore: update dependencies

# Conflicts:
#	package.json
#	pnpm-lock.yaml

* chore: replace custom HOLLAR setup with paraspell's default one

* fix: multisig signer when "any rpc" is selected
This commit is contained in:
Victor Oliva
2026-09-08 10:34:11 +02:00
committed by GitHub
parent 4302a02c60
commit ed2fd05ebe
5 changed files with 984 additions and 702 deletions

View File

@@ -17,18 +17,18 @@
"@acala-network/chopsticks-core": "^1.5.1",
"@ledgerhq/hw-transport-webusb": "^6.35.0",
"@monaco-editor/react": "^4.7.0",
"@paraspell/sdk": "14.3.0",
"@paraspell/sdk": "14.3.4",
"@polkadot-api/descriptors": "file:.papi/descriptors",
"@polkadot-api/forklift": "^0.5.1",
"@polkadot-api/json-rpc-provider-proxy": "^0.4.1",
"@polkadot-api/metadata-builders": "^0.15.0",
"@polkadot-api/observable-client": "^0.19.0",
"@polkadot-api/react-builder": "^0.6.0",
"@polkadot-api/metadata-builders": "^0.15.1",
"@polkadot-api/observable-client": "^0.19.1",
"@polkadot-api/react-builder": "^0.6.1",
"@polkadot-api/react-components": "^0.4.2",
"@polkadot-api/signers-common": "^0.3.0",
"@polkadot-api/substrate-bindings": "^0.21.0",
"@polkadot-api/signers-common": "^0.3.1",
"@polkadot-api/substrate-bindings": "^0.21.1",
"@polkadot-api/tx-creator": "^0.2.0",
"@polkadot-api/tx-utils": "^0.6.0",
"@polkadot-api/tx-utils": "^0.6.1",
"@polkahub/ui-components": "^0.9.1",
"@radix-ui/react-accordion": "^1.2.20",
"@radix-ui/react-dialog": "^1.1.23",
@@ -47,15 +47,15 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"idb-keyval": "^6.3.0",
"lucide-react": "^1.38.0",
"polkadot-api": "^3.0.0",
"lucide-react": "^1.41.0",
"polkadot-api": "^3.1.0",
"polkahub": "^0.9.1",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"react-portal": "^4.3.0",
"react-router-dom": "^7.18.3",
"react-svg": "^19.1.5",
"react-virtuoso": "^4.18.12",
"react-virtuoso": "^4.18.13",
"react18-json-view": "^0.2.10",
"rxjs": "^7.8.2",
"save-as": "^0.1.8",
@@ -67,19 +67,19 @@
"devDependencies": {
"@eslint/js": "^10.0.1",
"@tailwindcss/vite": "^4.3.3",
"@types/node": "^26.4.0",
"@types/node": "^26.4.1",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.5",
"@types/react-dom": "^19.2.7",
"@types/react-portal": "^4.0.7",
"@vitejs/plugin-react": "^6.1.1",
"eslint": "^10.9.1",
"eslint": "^10.10.0",
"eslint-plugin-react-hooks": "7.1.1",
"eslint-plugin-react-refresh": "^0.5.5",
"globals": "^17.11.0",
"eslint-plugin-react-refresh": "^0.5.6",
"globals": "^17.12.0",
"prettier": "^3.9.6",
"tailwindcss": "^4.3.3",
"typescript": "^7.0.2",
"typescript-eslint": "^8.68.0",
"typescript-eslint": "^8.69.0",
"vite": "^8.2.2"
},
"packageManager": "pnpm@11.22.0+sha512.1ff870c4c6133dfd88fb2afc46dd13d47f09c9794b438c6fdb47ca98caf3bc16381ee0be93a091b8e3824cf01f889f46d7d9e20910fb0be1ab0fb5baa80dd621"

1595
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,11 +2,11 @@ allowBuilds:
"@reown/appkit": true
esbuild: true
minimumReleaseAgeExclude:
- '@paraspell/assets@14.3.0'
- '@paraspell/descriptors@14.3.0'
- '@paraspell/pallets@14.3.0'
- '@paraspell/sdk-common@14.3.0'
- '@paraspell/sdk-core@14.3.0'
- '@paraspell/sdk@14.3.0'
- '@paraspell/assets@14.3.0 || 14.3.4'
- '@paraspell/descriptors@14.3.0 || 14.3.4'
- '@paraspell/pallets@14.3.0 || 14.3.4'
- '@paraspell/sdk-common@14.3.0 || 14.3.4'
- '@paraspell/sdk-core@14.3.0 || 14.3.4'
- '@paraspell/sdk@14.3.0 || 14.3.4'
patchedDependencies:
react18-json-view: patches/react18-json-view.patch

View File

@@ -177,7 +177,6 @@ const AssetPicker = () => {
)
}
// We add the HOLLAR destination in Hydration
const getParaspellBuilder = (
client: PolkadotClient,
cfg: {
@@ -191,23 +190,6 @@ const getParaspellBuilder = (
) => {
return Builder({
apiOverrides: { [cfg.origin]: client },
customAssets: {
Hydration: [
{
symbol: "HOLLAR",
assetId: "222",
decimals: 18,
existentialDeposit: "20000000000000000",
location: {
parents: 1,
interior: {
X2: [{ Parachain: 2034 }, { GeneralIndex: 222 }],
},
},
forceOverride: true,
},
],
},
})
.from(cfg.origin)
.to(cfg.dest)
@@ -224,12 +206,7 @@ const supportedDestinations$ = state(
const destinations = getSupportedDestinations(origin, {
location: selectedAsset.location,
})
if (origin === "AssetHubPolkadot" && selectedAsset.symbol === "HOLLAR") {
return [...destinations, "Hydration" as const]
}
if (origin === "Hydration" && selectedAsset.symbol === "HOLLAR") {
return [...destinations, "AssetHubPolkadot" as const]
}
console.log({ origin, location: selectedAsset.location }, destinations)
return destinations
}),
),

View File

@@ -1,20 +1,21 @@
import { polkadot_people } from "@polkadot-api/descriptors"
import { liftSuspense, state, SUSPENSE, withDefault } from "@react-rxjs/core"
import { AccountId, Binary, HexString, SS58String } from "polkadot-api"
import { WsEvent } from "polkadot-api/ws"
import {
Account,
createLedgerProvider,
createMultisigProvider,
multisigExternalSigner,
createPjsWalletProvider,
createPolkadotVaultProvider,
createPolkaHub,
createProxyProvider,
createReadOnlyProvider,
createSelectedAccountPlugin,
createWalletConnectProvider,
knownChains,
multisigExternalSigner,
Plugin,
createProxyProvider,
} from "polkahub"
import {
combineLatest,
@@ -29,11 +30,13 @@ import { chainProperties$ } from "./chain-props.state"
import {
canSetStorage$,
client$,
currentWsStatus$,
getChainSource,
selectedChain$,
unsafeApi$,
} from "./chains/chain.state"
import { identity$, isVerified } from "./identity.state"
import { WebsocketSource } from "./chains/websocket"
const removeSuspense = <T>() =>
pipe(
@@ -93,8 +96,10 @@ const proxyProvider = createProxyProvider((address) =>
),
)
const multisigProvider$ = selectedChain$.pipe(
switchMap(getChainSource),
map((source) => {
switchMap((chain) =>
combineLatest([getChainSource(chain), currentWsStatus$]),
),
map(([source, wsStatus]) => {
if (source.type === "websocket" && source.forkMethod !== "none") {
return null
}
@@ -115,8 +120,15 @@ const multisigProvider$ = selectedChain$.pipe(
return null
}
const getWsUri = (source: WebsocketSource) => {
if (wsStatus?.type === WsEvent.CONNECTED) return wsStatus.uri
return typeof source.endpoint === "string"
? source.endpoint
: source.endpoint[0]
}
const chain =
source.type === "chainSpec" ? `sm-${source.id}` : `ws-${source.endpoint}`
source.type === "chainSpec" ? `sm-${source.id}` : `ws-${getWsUri(source)}`
return createMultisigProvider(
multisigExternalSigner(