Skip to content

Commit

Permalink
Merge #1316
Browse files Browse the repository at this point in the history
1316: Set HTTP as the default transport r=popzxc a=StanislavBreadless

Set HTTP as the default transport for zksync.js

Co-authored-by: Stanislav Bezkorovainyi <[email protected]>
  • Loading branch information
2 parents 426176f + 12ca648 commit 1ae866f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/js-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ All notable changes to `zksync.js` will be documented in this file.
- `closestGreaterOrEqPackableTransactionAmount` and `closestGreaterOrEqPackableTransactionFee` functions. Tests for
them.

### Changed

- HTTP provider is now the default one.

### Fixed

- Bug with `integerToFloat` function. Now, it really rounds to the closest less or equal float number.
Expand Down
2 changes: 1 addition & 1 deletion sdk/zksync.js/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './types';
import { isTokenETH, sleep, SYNC_GOV_CONTRACT_INTERFACE, TokenSet } from './utils';

export async function getDefaultProvider(network: Network, transport: 'WS' | 'HTTP' = 'WS'): Promise<Provider> {
export async function getDefaultProvider(network: Network, transport: 'WS' | 'HTTP' = 'HTTP'): Promise<Provider> {
if (network === 'localhost') {
if (transport === 'WS') {
return await Provider.newWebsocketProvider('ws://127.0.0.1:3031');
Expand Down

0 comments on commit 1ae866f

Please sign in to comment.