Skip to content

Commit

Permalink
add stratos pubkey support
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiong-stratos committed Oct 16, 2024
1 parent c2fa93e commit 72eba19
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/keplr-stores/src/account/cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,10 @@ export class CosmosAccountImpl {
return "/injective.crypto.v1beta1.ethsecp256k1.PubKey";
}

if (this.chainId.startsWith("stratos")) {
return "/stratos.crypto.v1.ethsecp256k1.PubKey";
}

return "/ethermint.crypto.v1.ethsecp256k1.PubKey";
})(),
value: PubKey.encode({
Expand Down Expand Up @@ -625,6 +629,7 @@ export class CosmosAccountImpl {
.features?.includes("eth-key-sign") === true;

const chainIsInjective = this.chainId.startsWith("injective");
const chainIsStratos = this.chainId.startsWith("stratos");

const signed = await keplr.signDirect(
this.chainId,
Expand All @@ -649,6 +654,10 @@ export class CosmosAccountImpl {
return "/injective.crypto.v1beta1.ethsecp256k1.PubKey";
}

if (chainIsStratos) {
return "/stratos.crypto.v1.ethsecp256k1.PubKey";
}

return "/ethermint.crypto.v1.ethsecp256k1.PubKey";
})(),
value: PubKey.encode({
Expand Down

0 comments on commit 72eba19

Please sign in to comment.