Skip to main content
6 votes
Accepted

How to prevent Polkadot{.js} extension from injecting all addresses into the site's JavaScript context

The Polkadot{.js} extension doesn't offer site-specific account permissions the same way that Metamask does. However, you can set the global visibility of each individual account which will prevent ...
Dcompoze's user avatar
  • 620
6 votes
Accepted

Cannot map Enum JSON, unable to find 'aUSD' in token in api.tx.currencies.transfer

Looking at the extrinsics page, the currencyId is an Enum indicating the type of transfer. So you need to pass the Token explicitly. This should do the trick - const transfer = polkadot.tx.currencies....
Jaco's user avatar
  • 5,865
5 votes
Accepted

Implement utility.batch using @substrate/txwrapper-polkadot

I think it will be helpful for you to check the batchAll example in the txwrapper-core repository. It uses transferKeepAlive and batchAll but the concept is basically the same. In this example you ...
dominique's user avatar
  • 1,683
5 votes

Polkadot.js and Ledger device compatibility

Make sure that your Ledger firmware is the latest version: 2.0.2 Make sure that your Polkadot ledger app is the latest version: 11.9170.0 As you mentioned in the comments your derivation path ...
Dcompoze's user avatar
  • 620
4 votes

Polkadot.js and Ledger device compatibility

Firstly, I would like to advise that you shouldn't contribute DOT using a Ledger account. It becomes problematic when trying to access the crowdloaned tokens. A regular account created on Polkadot....
Paradox - ParaNodes.io's user avatar
4 votes
Accepted

How to send specific token (like ACA) using Polkadot.js

From what I understand from your question, if you just need to send a token between two accounts using polkadot.js you should check the corresponding Substrate runtime calls exposed by the API. In ...
Iker's user avatar
  • 1,356
3 votes

How can i update polkadot js metadata from inside my app?

So generally speaking Polkadot-js exposes two important Classes here that can be expanded upon for metadata: TypeRegistry, and Metadata. So the simple answer is yes: If you are using the ApiPromise (...
Tarik Gul's user avatar
  • 1,116
3 votes
Accepted

Connecting to a chain on `ws` localhost with polkadot.js app fails when running in brave browser

Disable Brave Shields or stop blocking trackers and adds for polkadot.js and the error will stop.
forgetso's user avatar
  • 1,502
3 votes
Accepted

Best way to make user sign N number of transactions

If your batch call must be split over multiple extrinsics, there is really not a way to avoid the user having to sign multiple calls unless you have the private key, and do a non-interactive message ...
Shawn Tabrizi's user avatar
  • 16k
2 votes

Parity signer fails to sign transaction with polkadot.js

As the error message suggests, you need to add a network to Parity Signer. Please follow this tutorial: https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html
Alexander Slesarev's user avatar
2 votes
Accepted

Index.html file not found on Firefox after building dev version of Polkadot.js extension

Fixed it by loading the index.html file instead of the manifest.json file. I created a pull request.
JasperAlexander's user avatar
2 votes

getting authentication and keyAgreement from sporran or polkadot.js extension

Checking the code of the @kiltprotocol/sdk-js library what you are looking for here is for the types NewLightDidVerificationKey and NewDidEncryptionKey you need to generate them from your keys, like ...
Alex Bean's user avatar
  • 5,722
2 votes

Connecting to a chain on `ws` localhost with polkadot.js app fails when running in brave browser

I got the same error API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure in this commit when trying to access http://localhost:3000 on my host machine to access an ink! DApp that I ...
Luke Schoen's user avatar
  • 2,332
1 vote

What is the signing context chosen by PolkadotJS API?

it seems it's hard-coded to "substrate" in both sp-core and here
dastansam's user avatar
  • 566
1 vote

Understanding the persistence of historical block events despite automatic removal by the System pallet in Substrate

Yes, you can still fetch and access the events emitted in previous blocks, even though they are automatically removed from the storage of the System pallet at the beginning of a new block. In ...
Kishan Verma's user avatar
1 vote

Implementing Stacking and Creating a Council in a Local Testnet

If you're speaking of Relay chain staking like Polkadot then you will need the staking pallet. There is a guide on how to use pallet staking here. If you're looking to have the substrate-node-template ...
Bruno's user avatar
  • 8,365
1 vote

How to stub win.injectedWeb3 for testing dApp with Cypress?

It sounds like you are trying to stub the win.injectedWeb3 object in order to write automated tests for your dApp frontend in Cypress with TypeScript. One option to achieve this is to use the @...
kayvan jam's user avatar
1 vote
Accepted

How to sign a payload using ECDSA in PolkadotJS?

This is a pending issue with both the polkadot JS extension and ink not lining up with how signatures should work and what's on offer from both packages. Currently, ink offers ECDSA verification and ...
goastler's user avatar
  • 569
1 vote

How to sign a payload using ECDSA in PolkadotJS?

To add account other than Alice one can use derivation phrase like so: const pair = keyring.addFromUri('some derivation words you have from key generation...'); or add from seed, json or pair - ...
Ivan Temchenko's user avatar
1 vote

How to add a Substrate token created with a smart contract to my wallet? What wallet can I use for testing in a local environment?

For this question to be properly answered you would have to provide more details. AFAIK the only wallet currently supporting tokens based on ink! is SubWallet (https://subwallet.app). They announced ...
cmichi's user avatar
  • 2,800
1 vote

How to extract account network in Polkadot JS Extension

No directly, but you can get that value. With the script below you get your accounts with its meta information (as you mentioned): import { web3AccountsSubscribe } from '@polkadot/extension-dapp'; ...
Alex Bean's user avatar
  • 5,722
1 vote

Multisig on js extension

Check this guide on the Polkadot Support Page: How to Create and Use a Multisig Account
Alex Bean's user avatar
  • 5,722
1 vote

Connecting to a chain on `ws` localhost with polkadot.js app fails when running in brave browser

This could happen if the browser does not allow insecure websocket connections from a https (secure) website. It should be possible to look into the site settings for https://polkadot.js.org/ and ...
Ankan's user avatar
  • 335
1 vote
Accepted

'window is not defined' issue when I integrate polkadot{js} extension into my dapp

The issue is about how Next.js renders the frontend code. From their docs: Next.js is universal, which means it executes code first server-side, then client-side. The window object is only present ...
Alex Bean's user avatar
  • 5,722
1 vote

How to remove account using polkadotjs? What function should I call to forget an account?

Exactly what Adam said. According to the docs: https://polkadot.js.org/docs/ui-keyring/start/addresses#removing-an-address forgetAddress mirrors forgetAccount and if we look in the code we will see ...
Bruno's user avatar
  • 8,365
1 vote

web3Enable prompts sign-in to all of my installed extensions when I only want a single prompt for a single extension

This talisman-connect package offers a solution to the problem that seems to be working well for us.
Astral Gnome's user avatar
1 vote

Wallet Selection Modal

A similar solution to support multi-wallet on polkadot ecosystem is in progress right now. I'll keep you posted once we are close to release.
Vadim's user avatar
  • 11
1 vote

How to prevent Polkadot{.js} extension from injecting all addresses into the site's JavaScript context

I can't comment yet, so all I'm left with is to answer: I implemented this feature a couple months ago https://github.com/polkadot-js/extension/pull/1068 I published an article about it too: https://...
Tbaut's user avatar
  • 253

Only top scored, non community-wiki answers of a minimum length are eligible