Skip to content

Commit

Permalink
refactor: use Node global fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Sep 11, 2024
1 parent ece80aa commit 96c0b24
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions a3p-integration/proposals/s:stake-bld/test-lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* global setTimeout */
import fetch from 'node-fetch';
/* eslint-env node */
import { execFileSync } from 'child_process';
import { makeWalletUtils } from './wallet.js';

Expand Down
4 changes: 1 addition & 3 deletions multichain-testing/scripts/fetch-starship-chain-info.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/usr/bin/env tsx
/* eslint-env node */

import nodeFetch from 'node-fetch';
import fsp from 'node:fs/promises';
import prettier from 'prettier';

import { convertChainInfo } from '@agoric/orchestration/src/utils/registry.js';

import type { IBCInfo, Chains } from '@chain-registry/types';

const fetch = nodeFetch.default;

/**
* Chain registry running in Starship
*
Expand Down
5 changes: 2 additions & 3 deletions packages/deployment/src/entrypoint.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env node
/* global setInterval */
/* eslint-env node */

import '@endo/init';

Expand All @@ -9,7 +9,6 @@ import temp from 'temp';
import process from 'process';
import { exec, spawn } from 'child_process';
import inquirer from 'inquirer';
import fetch from 'node-fetch';

import { running } from './run.js';
import { setup } from './setup.js';
Expand All @@ -22,7 +21,7 @@ deploy(process.argv[1], process.argv.splice(2), {
rd: files.reading(fs, path),
wr: files.writing(fs, path, temp),
setup: setup({ resolve: path.resolve, env: process.env, setInterval }),
running: running(process, { exec, process, spawn }),
running: running(process, { exec, spawn }),
inquirer,
fetch,
}).then(
Expand Down
3 changes: 1 addition & 2 deletions packages/solo/src/add-chain.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* global process */
import fetch from 'node-fetch';
/* eslint-env node */
import crypto from 'crypto';
import djson from 'deterministic-json';
import path from 'path';
Expand Down

0 comments on commit 96c0b24

Please sign in to comment.