Skip to content

Commit

Permalink
osmo work
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHighlander committed Mar 13, 2023
1 parent b65647f commit 1c5519d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ packageExtensions:
dependencies:
'@ethersproject/contracts': ^5.7.0
'@shapeshiftoss/logger': ^1.1.3
'@shapeshiftoss/hdwallet-core@1.41.0':
'@shapeshiftoss/hdwallet-core@1.46.0':
dependencies:
'@ethersproject/bytes': ^5.7.0
'@types/google-protobuf': ^3.5.16
Expand Down
2 changes: 1 addition & 1 deletion packages/hdwallet-keepkey-rest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keepkey/hdwallet-keepkey-rest",
"version": "1.40.16",
"version": "1.40.17",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions packages/hdwallet-keepkey-rest/src/kkrest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,12 +791,12 @@ export class KeepKeyRestHDWallet
})
}

public osmosisGetAccountPaths(msg: core.CosmosGetAccountPaths): core.CosmosAccountPath[] {
public osmosisGetAccountPaths(msg: core.OsmosisGetAccountPaths): core.OsmosisAccountPath[] {
return [
{
addressNList: [
0x80000000 + 44,
0x80000000 + core.slip44ByCoin('Atom'),
0x80000000 + core.slip44ByCoin('Osmo'),
0x80000000 + msg.accountIdx,
0,
0,
Expand All @@ -806,7 +806,7 @@ export class KeepKeyRestHDWallet
}

readonly osmosisGetAddress = _.memoize(
async (msg: core.CosmosGetAddress): Promise<string> => {
async (msg: core.OsmosisGetAddress): Promise<string> => {
return await this.abortable(async signal => {
return (
await this.sdk.address.osmosisGetAddress(
Expand All @@ -822,17 +822,17 @@ export class KeepKeyRestHDWallet
msg => JSON.stringify(msg),
)

public async osmosisSignTx(msg: core.CosmosSignTx): Promise<core.CosmosSignedTx> {
public async osmosisSignTx(msg: core.OsmosisSignTx): Promise<core.OsmosisSignedTx> {
return await this.abortable(async signal => {
const signerAddress = (
await this.sdk.address.cosmosGetAddress(
await this.sdk.address.osmosisGetAddress(
{
address_n: msg.addressNList,
},
{ signal },
)
).address
const signed = await this.sdk.cosmos.cosmosSignAmino(
const signed = await this.sdk.osmosis.cosmosSignAmino(
{
signDoc: {
account_number: msg.account_number,
Expand Down
2 changes: 1 addition & 1 deletion packages/keepkey-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keepkey/keepkey-sdk",
"version": "0.2.30",
"version": "0.2.31",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions packages/keepkey-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class KeepKeySdk {
readonly auth: apis.AuthApi
readonly bnb: apis.BNBApi
readonly cosmos: apis.CosmosApi
readonly osmosis: apis.CosmosApi
readonly eth: apis.ETHApi
readonly raw: apis.RawApi
readonly utxo: apis.UTXOApi
Expand All @@ -26,6 +27,7 @@ export class KeepKeySdk {
this.utxo = new apis.UTXOApi(configuration)
this.bnb = new apis.BNBApi(configuration)
this.cosmos = new apis.CosmosApi(configuration)
this.osmosis = new apis.CosmosApi(configuration)
this.eth = new apis.ETHApi(configuration)
this.raw = new apis.RawApi(configuration)
this.system = Object.freeze(
Expand Down

0 comments on commit 1c5519d

Please sign in to comment.