Skip to content

Commit

Permalink
Merge pull request #141 from legobeat/deps-0x
Browse files Browse the repository at this point in the history
fix(deps): update dep @0x/subproviders@^6.5.4->^8.0.1
  • Loading branch information
soralit authored May 13, 2024
2 parents 90ee66c + 901b704 commit 5a79f32
Show file tree
Hide file tree
Showing 5 changed files with 475 additions and 3,199 deletions.
2 changes: 1 addition & 1 deletion packages/keystone-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"url": "https://github.com/KeystoneHQ/keystone-airgaped-base/issues"
},
"dependencies": {
"@0x/subproviders": "^6.5.4",
"@0x/subproviders": "^8.0.1",
"@keystonehq/keystone-subprovider": "^0.19.2",
"@web3-react/abstract-connector": "^6.0.7",
"@web3-react/types": "^6.0.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/keystone-subprovider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"testEnvironment": "node"
},
"dependencies": {
"@0x/subproviders": "^6.5.4",
"@0x/subproviders": "^8.0.1",
"@ethereumjs/common": "^3.0.2",
"@ethereumjs/rlp": "^4.0.1",
"@ethereumjs/tx": "^4.0.2",
Expand Down
26 changes: 21 additions & 5 deletions packages/keystone-subprovider/src/baseWalletSubprovider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,28 @@ import { addressUtils } from "@0x/utils";
import { JSONRPCRequestPayload, JSONRPCResponsePayload } from "ethereum-types";

import {
Callback,
ErrorCallback,
PartialTxParams,
Subprovider,
} from "@0x/subproviders";


// From @0xproject/subproviders v8.0.1
export interface PartialTxParams {
nonce: string;
gasPrice?: string;
maxFeePerGas?: string;
maxPriorityFeePerGas?: string;
gas: string;
to: string;
from: string;
value?: string;
data?: string;
type?: number;
accessList?: Array<{
address: string;
storageKeys: string[];
}>;
}

export enum WalletSubproviderErrors {
AddressNotFound = "ADDRESS_NOT_FOUND",
DataMissingForSignPersonalMessage = "DATA_MISSING_FOR_SIGN_PERSONAL_MESSAGE",
Expand Down Expand Up @@ -55,8 +71,8 @@ export abstract class BaseWalletSubprovider extends Subprovider {
// tslint:disable-next-line:async-suffix
public async handleRequest(
payload: JSONRPCRequestPayload,
next: Callback,
end: ErrorCallback
next: () => void,
end: (err: Error | null, data?: any) => void
): Promise<void> {
let accounts;
let txParams;
Expand Down
3 changes: 1 addition & 2 deletions packages/keystone-subprovider/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { assert } from "@0x/assert";
import { PartialTxParams } from "@0x/subproviders";
import { BaseWalletSubprovider } from "./baseWalletSubprovider";
import { BaseWalletSubprovider, PartialTxParams } from "./baseWalletSubprovider";
import sdk, { SupportedResult } from "@keystonehq/sdk";
import { Common, Hardfork } from "@ethereumjs/common";
import {
Expand Down
Loading

0 comments on commit 5a79f32

Please sign in to comment.