Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
iGroza committed Feb 14, 2024
1 parent 3981a25 commit 22d0bd8
Show file tree
Hide file tree
Showing 3 changed files with 304 additions and 92 deletions.
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@haqq/provider-ledger-react-native",
"version": "0.0.25",
"version": "0.0.26",
"description": "Provider for react-native ledger",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -20,9 +20,9 @@
},
"dependencies": {
"@ethersproject/abstract-provider": "^5.7.0",
"@ledgerhq/hw-app-eth": "6.30.0",
"@ledgerhq/hw-transport": "^6.27.8",
"@ledgerhq/react-native-hw-transport-ble": "6.27.9",
"@ledgerhq/hw-app-eth": "6.35.4",
"@ledgerhq/hw-transport": "6.30.3",
"@ledgerhq/react-native-hw-transport-ble": "6.30.0",
"ethers": "^5.7.2",
"events": "^3.3.0",
"rxjs": "^7.8.0"
Expand All @@ -35,6 +35,7 @@
},
"devDependencies": {
"@haqq/provider-base": "0.0.20",
"@ledgerhq/types-devices": "^6.23.0",
"@types/jest": "^29.4.0",
"@types/node": "^18.14.1",
"@types/react-native": "^0.71.3",
Expand All @@ -50,4 +51,4 @@
"typedoc-plugin-markdown": "^3.14.0",
"typescript": "^4.9.5"
}
}
}
8 changes: 7 additions & 1 deletion src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ProviderLedgerReactNative
);
};
};

async confirmAddress(hdPath: string) {
return (await this.getAccountInfo(hdPath, true)).address;
}
Expand All @@ -63,6 +63,7 @@ export class ProviderLedgerReactNative
.then(result => {
o.next(result);
o.complete();
this.emit('getPublicKeyForHDPath', true);
})
.catch(e => {
try {
Expand Down Expand Up @@ -115,6 +116,7 @@ export class ProviderLedgerReactNative
.then(result => {
o.next(result);
o.complete();
this.emit('signTransaction', true);
})
.catch(e => {
try {
Expand Down Expand Up @@ -159,6 +161,7 @@ export class ProviderLedgerReactNative
.then(result => {
o.next(result);
o.complete();
this.emit('signPersonalMessage', true);
})
.catch(e => {
try {
Expand Down Expand Up @@ -200,6 +203,7 @@ export class ProviderLedgerReactNative
.then(result => {
o.next(result);
o.complete();
this.emit('signTypedData', true);
})
.catch(e => {
try {
Expand Down Expand Up @@ -230,13 +234,15 @@ export class ProviderLedgerReactNative
.then(() => {
o.next(true);
o.complete();
this.emit('suggestApp', true);
})
.catch(e => {
try {
o.error(e); // resolve in genericCanRetryOnError
} catch (_) {
o.next(false);
o.complete();
this.emit('suggestApp', false);
}
});
}),
Expand Down
Loading

0 comments on commit 22d0bd8

Please sign in to comment.