Using Plug wallet for local development and local ledger canister?

Hi all

I’m considering using Plug wallet in my project and would like to know if it’s actually possible to have some kind of a testing setup with the Plug wallet locally so that it uses locally deployed ledger canister (which would allow me to send ICP to my plug ID and populate funds that way and then “spend” them with the local ledger canister, since from what I’ve seen so far, it seems Plug uses the regular ledger whenever you send transactions ?

Is it possible to do and how? If not, how do you guys go around this when doing local dev for things that require transactions using locally deployed ledger canister?

3 Likes

Looks like they will be implementing that feature (to be able to use PLUG locally with ledger canister) in the near future and next releases. In the meantime, what do you think is the way to go, since it’s impossible to use PLUG or similar wallet(s) locally while using locally deployed ledger canister?

4 Likes

Have you found a solution to the problem?

For local testing you have to follow two steps :

i dont think it’s that much usefull, How can I view and transfer my ICRC-1 dTokens locally using Plug Wallet to verify that everything is working correctly during development? (on the plug ui)

Hey!
To enable dev mode, please go to Settings → Developer Zone.

Here you need to enable Test mode and configure your network.

You can then use window.ic.plug.createAgent({ host }), where host would be your localhost:[port].

Please make sure that both host definititions in plug app settings and in your code match - otherwise you will get invalid certificate error.

To test ICRC token balances locally deployed - you will need to:

  • go to Developer Zone settings again
  • click edit on previosly created network
  • you will see button “create test token”

Here you will be able to define canister IDs of your local tokens. Balances should appear on homescreen.

i did all this even then i was not able to see the dtoken balance on the plug screen. (for info dtokens are tokens made by us to give it to users as they gonna supply icp and other token onto the platform).


see this is how its, without the balance on the ui