Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
krpeacock committed Oct 21, 2024
1 parent db92356 commit 1935898
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
28 changes: 15 additions & 13 deletions packages/agent/src/actor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Buffer } from "buffer/";
import { Buffer } from 'buffer/';
import {
Agent,
getDefaultAgent,
Expand All @@ -9,16 +9,16 @@ import {
SubmitResponse,
v2ResponseBody,
v3ResponseBody,
} from "./agent";
import { AgentError } from "./errors";
import { bufFromBufLike, IDL } from "@dfinity/candid";
import { pollForResponse, PollStrategyFactory, strategy } from "./polling";
import { Principal } from "@dfinity/principal";
import { RequestId } from "./request_id";
import { toHex } from "./utils/buffer";
import { Certificate, CreateCertificateOptions, lookupResultToBuffer } from "./certificate";
import managementCanisterIdl from "./canisters/management_idl";
import _SERVICE, { canister_install_mode, canister_settings } from "./canisters/management_service";
} from './agent';
import { AgentError } from './errors';
import { bufFromBufLike, IDL } from '@dfinity/candid';
import { pollForResponse, PollStrategyFactory, strategy } from './polling';
import { Principal } from '@dfinity/principal';
import { RequestId } from './request_id';
import { toHex } from './utils/buffer';
import { Certificate, CreateCertificateOptions, lookupResultToBuffer } from './certificate';
import managementCanisterIdl from './canisters/management_idl';
import _SERVICE, { canister_install_mode, canister_settings } from './canisters/management_service';

export class ActorCallError extends AgentError {
constructor(
Expand Down Expand Up @@ -585,13 +585,15 @@ function _createActorMethod(
} else if (!response.ok || response.body /* IC-1462 */) {
// handle v2 response errors by throwing an UpdateCallRejectedError object
const { reject_code, reject_message, error_code } = response.body as v2ResponseBody;
throw new UpdateCallRejectedError(cid,
throw new UpdateCallRejectedError(
cid,
methodName,
requestId,
response,
reject_code,
reject_message,
error_code)
error_code,
);
}

// Fall back to polling if we receive an Accepted response code
Expand Down
16 changes: 8 additions & 8 deletions packages/agent/src/certificate.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as cbor from "./cbor";
import { AgentError } from "./errors";
import { hash } from "./request_id";
import { bufEquals, concat, fromHex, toHex } from "./utils/buffer";
import { Principal } from "@dfinity/principal";
import * as bls from "./utils/bls";
import { decodeTime } from "./utils/leb";
import { MANAGEMENT_CANISTER_ID } from "./agent";
import * as cbor from './cbor';
import { AgentError } from './errors';
import { hash } from './request_id';
import { bufEquals, concat, fromHex, toHex } from './utils/buffer';
import { Principal } from '@dfinity/principal';
import * as bls from './utils/bls';
import { decodeTime } from './utils/leb';
import { MANAGEMENT_CANISTER_ID } from './agent';

/**
* A certificate may fail verification with respect to the provided public key
Expand Down

0 comments on commit 1935898

Please sign in to comment.