Commit 6ef974ab by cf

fixed gm support

parent 33e45d97
...@@ -331,6 +331,8 @@ export const stringToPublicKey = (s: string): Key => { ...@@ -331,6 +331,8 @@ export const stringToPublicKey = (s: string): Key => {
return stringToKey(s.substr(7), KeyType.r1, publicKeyDataSize, 'R1'); return stringToKey(s.substr(7), KeyType.r1, publicKeyDataSize, 'R1');
} else if (s.substr(0, 7) === 'PUB_WA_') { } else if (s.substr(0, 7) === 'PUB_WA_') {
return stringToKey(s.substr(7), KeyType.wa, 0, 'WA'); return stringToKey(s.substr(7), KeyType.wa, 0, 'WA');
}else if (s.substr(0, 7) === 'PUB_GM_') {
return stringToKey(s.substr(7), KeyType.gm, 0, 'GM');
} else { } else {
throw new Error('unrecognized public key format'); throw new Error('unrecognized public key format');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment