[mina-signer] Invalid NetworkId for devnet environment
Looks like a few days ago, MINA changed their internal NetworkId:
{
"code": 4,
"message": "Network doesn't exist",
"description": "The network doesn't exist.",
"retriable": false,
"details": {
"body": [
"Network_doesn't_exist",
"mina:testnet",
"mina:devnet"
],
"error": "You are requesting the status for the network mina:testnet, but you are connected to the network mina:devnet\n"
}
}
Therefore, I assume this
export type NetworkId = 'mainnet' | 'testnet' | { custom: string };
should be changed to
export type NetworkId = 'mainnet' | 'devnet' | { custom: string }; ?
Thanks for bringing this up! I'll update that identifier in the SDK, but could you let me know what action you were taking to trigger this error?
The mina-signer type doesn't have anything to do with connecting to any network, so it must be something else that needs changing!
(mina-signer is just a signing library. and NetworkId just determines a 0 or 1 byte that becomes part of the signed message)
Well, judging by the following commit, I was indeed right 😅 https://github.com/o1-labs/o1js/commit/d68b785fe7b240311b459c823c98f1aa9d2646a2
Well, judging by the following commit, I was indeed right 😅 d68b785
nope, this was changed for cosmetic reasons, not because it caused the error you posted
Ok, you're right - so under the hood it still applies 0/1, just the name changes. Indeed, if I use {custom: devnet}, then it doesn't sign properly.