parent
1d74c258be
commit
000aed06e5
62
package.json
62
package.json
@ -69,10 +69,10 @@
|
||||
"devDependencies": {
|
||||
"@crustio/crust-pin": "^1.0.0",
|
||||
"@pinata/sdk": "^2.1.0",
|
||||
"@polkadot/dev": "^0.72.20",
|
||||
"@polkadot/dev": "^0.72.24",
|
||||
"@types/chart.js": "^2.9.37",
|
||||
"@types/file-saver": "^2.0.5",
|
||||
"@types/react-beautiful-dnd": "^13.1.3",
|
||||
"@types/react-beautiful-dnd": "^13.1.4",
|
||||
"@types/react-copy-to-clipboard": "^5.0.4",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
@ -82,10 +82,10 @@
|
||||
"concurrently": "^7.6.0",
|
||||
"devtron": "^1.4.0",
|
||||
"dnslink-cloudflare": "^3.0.0",
|
||||
"electron": "^23.1.4",
|
||||
"electron": "^23.2.0",
|
||||
"electron-builder": "23.6.0",
|
||||
"electron-builder-notarize": "^1.5.1",
|
||||
"i18next-scanner": "^4.1.1",
|
||||
"i18next-scanner": "^4.2.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-is": "^18.2.0",
|
||||
@ -93,34 +93,34 @@
|
||||
"styled-components": "^5.3.9"
|
||||
},
|
||||
"resolutions": {
|
||||
"@polkadot/api": "^10.1.3",
|
||||
"@polkadot/api-augment": "^10.1.3",
|
||||
"@polkadot/api-base": "^10.1.3",
|
||||
"@polkadot/api-contract": "^10.1.3",
|
||||
"@polkadot/api-derive": "^10.1.3",
|
||||
"@polkadot/hw-ledger": "^11.0.2",
|
||||
"@polkadot/keyring": "^11.0.2",
|
||||
"@polkadot/networks": "^11.0.2",
|
||||
"@polkadot/phishing": "^0.20.2",
|
||||
"@polkadot/rpc-augment": "^10.1.3",
|
||||
"@polkadot/rpc-core": "^10.1.3",
|
||||
"@polkadot/rpc-provider": "^10.1.3",
|
||||
"@polkadot/types": "^10.1.3",
|
||||
"@polkadot/types-augment": "^10.1.3",
|
||||
"@polkadot/types-codec": "^10.1.3",
|
||||
"@polkadot/types-create": "^10.1.3",
|
||||
"@polkadot/types-known": "^10.1.3",
|
||||
"@polkadot/types-support": "^10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/util-crypto": "^11.0.2",
|
||||
"@polkadot/api": "^10.2.1",
|
||||
"@polkadot/api-augment": "^10.2.1",
|
||||
"@polkadot/api-base": "^10.2.1",
|
||||
"@polkadot/api-contract": "^10.2.1",
|
||||
"@polkadot/api-derive": "^10.2.1",
|
||||
"@polkadot/hw-ledger": "^11.1.2",
|
||||
"@polkadot/keyring": "^11.1.2",
|
||||
"@polkadot/networks": "^11.1.2",
|
||||
"@polkadot/phishing": "^0.20.4",
|
||||
"@polkadot/rpc-augment": "^10.2.1",
|
||||
"@polkadot/rpc-core": "^10.2.1",
|
||||
"@polkadot/rpc-provider": "^10.2.1",
|
||||
"@polkadot/types": "^10.2.1",
|
||||
"@polkadot/types-augment": "^10.2.1",
|
||||
"@polkadot/types-codec": "^10.2.1",
|
||||
"@polkadot/types-create": "^10.2.1",
|
||||
"@polkadot/types-known": "^10.2.1",
|
||||
"@polkadot/types-support": "^10.2.1",
|
||||
"@polkadot/util": "^11.1.2",
|
||||
"@polkadot/util-crypto": "^11.1.2",
|
||||
"@polkadot/wasm-crypto": "^7.0.3",
|
||||
"@polkadot/x-bigint": "^11.0.2",
|
||||
"@polkadot/x-fetch": "^11.0.2",
|
||||
"@polkadot/x-global": "^11.0.2",
|
||||
"@polkadot/x-randomvalues": "^11.0.2",
|
||||
"@polkadot/x-textdecoder": "^11.0.2",
|
||||
"@polkadot/x-textencoder": "^11.0.2",
|
||||
"@polkadot/x-ws": "^11.0.2",
|
||||
"@polkadot/x-bigint": "^11.1.2",
|
||||
"@polkadot/x-fetch": "^11.1.2",
|
||||
"@polkadot/x-global": "^11.1.2",
|
||||
"@polkadot/x-randomvalues": "^11.1.2",
|
||||
"@polkadot/x-textdecoder": "^11.1.2",
|
||||
"@polkadot/x-textencoder": "^11.1.2",
|
||||
"@polkadot/x-ws": "^11.1.2",
|
||||
"styled-components": "^5.3.1",
|
||||
"typescript": "^5.0.2"
|
||||
}
|
||||
|
||||
@ -28,25 +28,25 @@
|
||||
"@fragnova/api-augment": "0.1.0-spec-1.0.4-mainnet",
|
||||
"@frequency-chain/api-augment": "1.3.0",
|
||||
"@interlay/interbtc-types": "1.12.0",
|
||||
"@kiltprotocol/type-definitions": "0.31.1",
|
||||
"@kiltprotocol/type-definitions": "0.32.0",
|
||||
"@laminar/type-definitions": "0.3.1",
|
||||
"@logion/node-api": "0.9.0-3",
|
||||
"@mangata-finance/types": "0.18.0",
|
||||
"@metaverse-network-sdk/type-definitions": "0.0.1-16",
|
||||
"@parallel-finance/type-definitions": "1.7.16",
|
||||
"@phala/typedefs": "0.2.33",
|
||||
"@polkadot/api": "^10.1.3",
|
||||
"@polkadot/api-derive": "^10.1.3",
|
||||
"@polkadot/networks": "^11.0.2",
|
||||
"@polkadot/types": "^10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/api": "^10.2.1",
|
||||
"@polkadot/api-derive": "^10.2.1",
|
||||
"@polkadot/networks": "^11.1.2",
|
||||
"@polkadot/types": "^10.2.1",
|
||||
"@polkadot/util": "^11.1.2",
|
||||
"@polkadot/wasm-util": "^7.0.3",
|
||||
"@polkadot/x-fetch": "^11.0.2",
|
||||
"@polkadot/x-ws": "^11.0.2",
|
||||
"@polkadot/x-fetch": "^11.1.2",
|
||||
"@polkadot/x-ws": "^11.1.2",
|
||||
"@polymeshassociation/polymesh-types": "5.3.0",
|
||||
"@snowfork/snowbridge-types": "0.2.7",
|
||||
"@sora-substrate/type-definitions": "1.15.8",
|
||||
"@subsocial/definitions": "0.8.6",
|
||||
"@sora-substrate/type-definitions": "1.15.12",
|
||||
"@subsocial/definitions": "0.8.7",
|
||||
"@unique-nft/opal-testnet-types": "937.53.1",
|
||||
"@unique-nft/quartz-mainnet-types": "937.53.1",
|
||||
"@unique-nft/sapphire-mainnet-types": "937.53.1",
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"sideEffects": false,
|
||||
"version": "0.124.2-182-x",
|
||||
"dependencies": {
|
||||
"@polkadot/dev": "^0.72.20",
|
||||
"@polkadot/dev": "^0.72.24",
|
||||
"@polkadot/react-components": "^0.124.2-182-x",
|
||||
"electron-log": "^5.0.0-beta.16",
|
||||
"electron-updater": "^5.3.0"
|
||||
|
||||
@ -14,7 +14,7 @@ export default function create (t: TFunction): Route {
|
||||
isHidden: false,
|
||||
needsAccounts: true,
|
||||
needsApi: [
|
||||
'tx.balances.transfer'
|
||||
'tx.balances.transferKeepAlive'
|
||||
]
|
||||
},
|
||||
group: 'accounts',
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
"dependencies": {
|
||||
"@polkadot/apps-config": "^0.124.2-182-x",
|
||||
"@polkadot/apps-routing": "^0.124.2-182-x",
|
||||
"@polkadot/dev": "^0.72.20",
|
||||
"@polkadot/dev": "^0.72.24",
|
||||
"@polkadot/react-api": "^0.124.2-182-x",
|
||||
"@polkadot/react-components": "^0.124.2-182-x",
|
||||
"@polkadot/react-hooks": "^0.124.2-182-x",
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-182-x",
|
||||
"dependencies": {
|
||||
"@polkadot/hw-ledger": "^11.0.2",
|
||||
"@polkadot/phishing": "^0.20.2",
|
||||
"@polkadot/hw-ledger": "^11.1.2",
|
||||
"@polkadot/phishing": "^0.20.4",
|
||||
"@polkadot/react-components": "^0.124.2-182-x",
|
||||
"@polkadot/react-hooks": "^0.124.2-182-x",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/vanitygen": "^0.53.5",
|
||||
"@polkadot/util": "^11.1.2",
|
||||
"@polkadot/vanitygen": "^0.53.7",
|
||||
"detect-browser": "^5.3.0",
|
||||
"file-saver": "^2.0.5"
|
||||
},
|
||||
|
||||
@ -217,7 +217,7 @@ function Transfer ({ className = '', onClose, recipientId: propRecipientId, send
|
||||
? api.tx.balances?.transferAll
|
||||
: isProtected
|
||||
? api.tx.balances?.transferKeepAlive
|
||||
: api.tx.balances?.transfer
|
||||
: api.tx.balances?.transferAllowDeath || api.tx.balances?.transfer
|
||||
}
|
||||
/>
|
||||
</Modal.Actions>
|
||||
|
||||
@ -21,6 +21,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"testcontainers": "^9.2.1"
|
||||
"testcontainers": "^9.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-182-x",
|
||||
"dependencies": {
|
||||
"@polkadot/api-contract": "^10.1.3"
|
||||
"@polkadot/api-contract": "^10.2.1",
|
||||
"eventemitter3": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
import type { Hash } from '@polkadot/types/interfaces';
|
||||
import type { CodeJson, CodeStored } from './types.js';
|
||||
|
||||
import EventEmitter from 'eventemitter3';
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import store from 'store';
|
||||
|
||||
import { Abi } from '@polkadot/api-contract';
|
||||
|
||||
@ -19,10 +19,10 @@ const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
|
||||
const randomAmount = Math.floor((Math.random() * 100000) + 1);
|
||||
|
||||
// Create a extrinsic, transferring randomAmount units to Bob.
|
||||
const transfer = api.tx.balances.transfer(BOB, randomAmount);
|
||||
const transfer = api.tx.balances.transferAllowDeath(BOB, randomAmount);
|
||||
|
||||
// Sign and Send the transaction
|
||||
await transfer.signAndSend(ALICE, ({ events = [], status }) => {
|
||||
await transferAllowDeath.signAndSend(ALICE, ({ events = [], status }) => {
|
||||
if (status.isInBlock) {
|
||||
console.log('Successful transfer of ' + randomAmount + ' with hash ' + status.asInBlock.toHex());
|
||||
} else {
|
||||
|
||||
@ -10,7 +10,7 @@ const nonce = await api.query.system.accountNonce(ALICE),
|
||||
console.log('Current nonce', nonce);
|
||||
|
||||
const unsub = await api.tx.balances
|
||||
.transfer(recipient,12345)
|
||||
.transferAllowDeath(recipient,12345)
|
||||
.signAndSend(sender, ({ events = [], status }) => {
|
||||
console.log('Transaction status:', status.type);
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { SignedBlockExtended } from '@polkadot/api-derive/types';
|
||||
import type { Event } from '@polkadot/types/interfaces';
|
||||
import type { PolkadotPrimitivesV2CandidateReceipt } from '@polkadot/types/lookup';
|
||||
import type { PolkadotPrimitivesV4CandidateReceipt } from '@polkadot/types/lookup';
|
||||
import type { IEvent } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { EventMapInfo } from './types.js';
|
||||
@ -26,7 +26,7 @@ const EMPTY_EVENTS: Result = { lastBacked: {}, lastIncluded: {}, lastTimeout: {}
|
||||
|
||||
function includeEntry (map: EventMap, event: Event, blockHash: string, blockNumber: BN): void {
|
||||
try {
|
||||
const { descriptor } = (event as unknown as IEvent<[PolkadotPrimitivesV2CandidateReceipt]>).data[0];
|
||||
const { descriptor } = (event as unknown as IEvent<[PolkadotPrimitivesV4CandidateReceipt]>).data[0];
|
||||
|
||||
if (descriptor && descriptor.paraId) {
|
||||
map[descriptor.paraId.toString()] = {
|
||||
|
||||
@ -20,10 +20,10 @@
|
||||
"path": false
|
||||
},
|
||||
"dependencies": {
|
||||
"@polkadot/api": "^10.1.3",
|
||||
"@polkadot/extension-compat-metamask": "^0.45.2",
|
||||
"@polkadot/extension-dapp": "^0.45.2",
|
||||
"@polkadot/rpc-provider": "^10.1.3",
|
||||
"@polkadot/api": "^10.2.1",
|
||||
"@polkadot/extension-compat-metamask": "^0.45.4",
|
||||
"@polkadot/extension-dapp": "^0.45.4",
|
||||
"@polkadot/rpc-provider": "^10.2.1",
|
||||
"fflate": "^0.7.4",
|
||||
"rxjs": "^7.8.0"
|
||||
}
|
||||
|
||||
@ -19,21 +19,21 @@
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.3.0",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
"@polkadot/keyring": "^11.0.2",
|
||||
"@polkadot/keyring": "^11.1.2",
|
||||
"@polkadot/react-api": "^0.124.2-182-x",
|
||||
"@polkadot/react-identicon": "^3.0.2",
|
||||
"@polkadot/react-qr": "^3.0.2",
|
||||
"@polkadot/react-identicon": "^3.1.3",
|
||||
"@polkadot/react-qr": "^3.1.3",
|
||||
"@polkadot/react-query": "^0.124.2-182-x",
|
||||
"@polkadot/ui-keyring": "^3.0.2",
|
||||
"@polkadot/ui-settings": "^3.0.2",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/util-crypto": "^11.0.2",
|
||||
"@polkadot/ui-keyring": "^3.1.3",
|
||||
"@polkadot/ui-settings": "^3.1.3",
|
||||
"@polkadot/util": "^11.1.2",
|
||||
"@polkadot/util-crypto": "^11.1.2",
|
||||
"@types/chartjs-plugin-crosshair": "^1.1.1",
|
||||
"chart.js": "^4.2.1",
|
||||
"chartjs-plugin-annotation": "^2.2.1",
|
||||
"chartjs-plugin-crosshair": "^1.2.0",
|
||||
"codeflask": "^1.4.1",
|
||||
"i18next": "^22.4.12",
|
||||
"i18next": "^22.4.13",
|
||||
"i18next-browser-languagedetector": "^7.0.1",
|
||||
"owasp-password-strength-test": "^1.3.0",
|
||||
"react": "^18.2.0",
|
||||
@ -44,7 +44,7 @@
|
||||
"react-dropzone": "^14.2.3",
|
||||
"react-i18next": "^12.2.0",
|
||||
"react-is": "^18.2.0",
|
||||
"react-markdown": "^8.0.5",
|
||||
"react-markdown": "^8.0.6",
|
||||
"react-router": "^5.3.4",
|
||||
"react-router-dom": "^5.3.4",
|
||||
"react-tooltip": "^4.5.1",
|
||||
|
||||
@ -13,7 +13,7 @@ export const rewardDestinationOptions = [
|
||||
|
||||
export const balanceCalls = [
|
||||
'auctions.bid',
|
||||
'balances.forceTransfer', 'balances.forceUnreserve', 'balances.setBalance', 'balances.transfer', 'balances.transferKeepAlive',
|
||||
'balances.forceTransfer', 'balances.forceUnreserve', 'balances.setBalance', 'balances.transfer', 'balances.transferAllowDeath', 'balances.transferKeepAlive',
|
||||
'bounties.proposeBounty', 'bounties.proposeCurator',
|
||||
'childBounties.proposeCurator',
|
||||
'claims.mintClaim',
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-182-x",
|
||||
"dependencies": {
|
||||
"@polkadot/hw-ledger": "^11.0.2",
|
||||
"@polkadot/hw-ledger": "^11.1.2",
|
||||
"@polkadot/hw-ledger-transports": "^11.1.2",
|
||||
"is-ipfs": "^8.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { LedgerTypes } from '@polkadot/hw-ledger/types';
|
||||
import type { TransportType } from '@polkadot/hw-ledger-transports/types';
|
||||
|
||||
import { useCallback, useMemo } from 'react';
|
||||
|
||||
@ -38,10 +38,10 @@ const ledgerChains = Object
|
||||
.filter((n) => knownLedger[n]);
|
||||
const ledgerHashes = ledgerChains.reduce<string[]>((all, n) => [...all, ...knownGenesis[n]], []);
|
||||
let ledger: Ledger | null = null;
|
||||
let ledgerType: LedgerTypes | null = null;
|
||||
let ledgerType: TransportType | null = null;
|
||||
|
||||
function retrieveLedger (api: ApiPromise): Ledger {
|
||||
const currType = uiSettings.ledgerConn as LedgerTypes;
|
||||
const currType = uiSettings.ledgerConn as TransportType;
|
||||
|
||||
if (!ledger || ledgerType !== currType) {
|
||||
const genesisHex = api.genesisHash.toHex();
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-182-x",
|
||||
"dependencies": {
|
||||
"@polkadot/hw-ledger": "^11.0.2",
|
||||
"@polkadot/hw-ledger": "^11.1.2",
|
||||
"@polkadot/react-components": "^0.124.2-182-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ function PaymentInfo ({ accountId, className = '', extrinsic, isHeader }: Props)
|
||||
return null;
|
||||
}
|
||||
|
||||
const isFeeError = api.consts.balances && !api.tx.balances?.transfer.is(extrinsic) && balances?.accountId.eq(accountId) && (
|
||||
const isFeeError = api.consts.balances && !(api.tx.balances?.transferAllowDeath?.is(extrinsic) || api.tx.balances?.transfer?.is(extrinsic)) && balances?.accountId.eq(accountId) && (
|
||||
balances.availableBalance.lte(dispatchInfo.partialFee) ||
|
||||
balances.freeBalance.sub(dispatchInfo.partialFee).lte(api.consts.balances.existentialDeposit)
|
||||
);
|
||||
|
||||
@ -17,10 +17,10 @@
|
||||
"version": "0.124.2-182-x",
|
||||
"dependencies": {
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"testcontainers": "^9.2.1"
|
||||
"testcontainers": "^9.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types-support": "^10.1.3",
|
||||
"@polkadot/types-support": "^10.2.1",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"tsconfig-paths": "^4.1.2"
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ export async function acceptMotion (api: ApiPromise, hash: Hash, index: number):
|
||||
}
|
||||
|
||||
export async function fillTreasury (api: ApiPromise, signer: KeyringPair): Promise<void> {
|
||||
await execute(api.tx.balances.transfer(TREASURY_ADDRESS, new BN('50000000000000000')), signer);
|
||||
await execute((api.tx.balances.transferAllowDeath || api.tx.balances.transfer)(TREASURY_ADDRESS, new BN('50000000000000000')), signer);
|
||||
}
|
||||
|
||||
export async function proposeMotion (api: ApiPromise, submittableExtrinsic: SubmittableExtrinsic<'promise'>, signer: KeyringPair): Promise<void> {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user