Skip to content

Commit

Permalink
Fixed old references to errors package.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Aug 3, 2019
1 parent b21681a commit 1cabce7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/abstract-provider/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { BigNumber, BigNumberish } from "@ethersproject/bignumber";
import { BytesLike, isHexString } from "@ethersproject/bytes";
import { checkAbstract } from "@ethersproject/errors";
import { Network } from "@ethersproject/networks";
import { Description, defineReadOnly } from "@ethersproject/properties";
import { Transaction } from "@ethersproject/transactions";
Expand Down Expand Up @@ -261,7 +260,7 @@ export abstract class Provider implements OnceBlockable {
readonly _isProvider: boolean;

constructor() {
checkAbstract(new.target, Provider);
logger.checkAbstract(new.target, Provider);
defineReadOnly(this, "_isProvider", true);
}

Expand Down
6 changes: 4 additions & 2 deletions packages/sha2/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import { createHash, createHmac } from 'crypto';

import { arrayify, BytesLike } from '@ethersproject/bytes';
import * as errors from '@ethersproject/errors';

import { Logger } from "@ethersproject/logger";
import { version } from "./_version";
const logger = new Logger(version);

export enum SupportedAlgorithms { sha256 = "sha256", sha512 = "sha512" };

Expand All @@ -24,7 +26,7 @@ export function sha512(data: BytesLike): string {

export function computeHmac(algorithm: SupportedAlgorithms, key: BytesLike, data: BytesLike): string {
if (!SupportedAlgorithms[algorithm]) {
errors.throwError("unsupported algorithm - " + algorithm, errors.UNSUPPORTED_OPERATION, {
logger.throwError("unsupported algorithm - " + algorithm, Logger.errors.UNSUPPORTED_OPERATION, {
operation: "computeHmac",
algorithm: algorithm
});
Expand Down

0 comments on commit 1cabce7

Please sign in to comment.