Change all instances of networkId
to chainId
(#2313)
* abi-gen/test: recompile contract fixtures for 3.0 It seems this hadn't been done since the merge with the 3.0 branch. * Sync `monorepo$ yarn test` exclusions to CI config * sra-spec: correct typo * contract-wrappers: TODO after coord.-server update * utils: fix typo in comment * Refactor networkId to chainId everywhere * Update CHANGELOGs
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"version": "6.0.0-beta.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "All references to network ID have been removed, and references to chain ID have been introduced instead",
|
||||
"pr": 2313
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "5.1.0-beta.0",
|
||||
"changes": [
|
||||
|
@@ -53,7 +53,7 @@ export class HttpClient {
|
||||
}
|
||||
/**
|
||||
* Retrieve assetData pair info from the API
|
||||
* @param requestOpts Options specifying assetData information to retrieve, page information, and network id.
|
||||
* @param requestOpts Options specifying assetData information to retrieve, page information, and chain id.
|
||||
* @return The resulting AssetPairsResponse that match the request
|
||||
*/
|
||||
public async getAssetPairsAsync(
|
||||
@@ -73,7 +73,7 @@ export class HttpClient {
|
||||
}
|
||||
/**
|
||||
* Retrieve orders from the API
|
||||
* @param requestOpts Options specifying orders to retrieve and page information, page information, and network id.
|
||||
* @param requestOpts Options specifying orders to retrieve and page information, page information, and chain id.
|
||||
* @return The resulting OrdersResponse that match the request
|
||||
*/
|
||||
public async getOrdersAsync(
|
||||
@@ -111,7 +111,7 @@ export class HttpClient {
|
||||
/**
|
||||
* Retrieve an orderbook from the API
|
||||
* @param request An OrderbookRequest instance describing the specific orderbook to retrieve
|
||||
* @param requestOpts Options specifying page information, and network id.
|
||||
* @param requestOpts Options specifying page information, and chain id.
|
||||
* @return The resulting OrderbookResponse that matches the request
|
||||
*/
|
||||
public async getOrderbookAsync(
|
||||
@@ -133,7 +133,7 @@ export class HttpClient {
|
||||
/**
|
||||
* Retrieve fee information from the API
|
||||
* @param request A OrderConfigRequest instance describing the specific fees to retrieve
|
||||
* @param requestOpts Options specifying network id.
|
||||
* @param requestOpts Options specifying chain id.
|
||||
* @return The resulting OrderConfigResponse that matches the request
|
||||
*/
|
||||
public async getOrderConfigAsync(
|
||||
@@ -154,7 +154,7 @@ export class HttpClient {
|
||||
}
|
||||
/**
|
||||
* Retrieve the list of fee recipient addresses used by the relayer.
|
||||
* @param requestOpts Options specifying page information, and network id.
|
||||
* @param requestOpts Options specifying page information, and chain id.
|
||||
* @return The resulting FeeRecipientsResponse
|
||||
*/
|
||||
public async getFeeRecipientsAsync(requestOpts?: RequestOpts & PagedRequestOpts): Promise<FeeRecipientsResponse> {
|
||||
@@ -172,7 +172,7 @@ export class HttpClient {
|
||||
/**
|
||||
* Submit a signed order to the API
|
||||
* @param signedOrder A SignedOrder instance to submit
|
||||
* @param requestOpts Options specifying network id.
|
||||
* @param requestOpts Options specifying chain id.
|
||||
*/
|
||||
public async submitOrderAsync(signedOrder: SignedOrder, requestOpts?: RequestOpts): Promise<void> {
|
||||
assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema);
|
||||
|
@@ -53,9 +53,9 @@ describe('HttpClient', () => {
|
||||
assetDataA: assetData,
|
||||
page: 3,
|
||||
perPage: 50,
|
||||
networkdId: 42,
|
||||
chainId: 42,
|
||||
};
|
||||
const urlWithQuery = `${url}?assetDataA=${assetData}&networkdId=42&page=3&perPage=50`;
|
||||
const urlWithQuery = `${url}?assetDataA=${assetData}&chainId=42&page=3&perPage=50`;
|
||||
fetchMock.get(urlWithQuery, assetDataPairsResponseJSON);
|
||||
const assetDataPairs = await relayerClient.getAssetPairsAsync(assetPairsRequestOpts);
|
||||
expect(assetDataPairs).to.be.deep.equal(assetDataPairsResponse);
|
||||
@@ -78,9 +78,9 @@ describe('HttpClient', () => {
|
||||
assetDataAddress,
|
||||
page: 3,
|
||||
perPage: 50,
|
||||
networkdId: 42,
|
||||
chainId: 42,
|
||||
};
|
||||
const urlWithQuery = `${url}?assetDataAddress=${assetDataAddress}&networkdId=42&page=3&perPage=50`;
|
||||
const urlWithQuery = `${url}?assetDataAddress=${assetDataAddress}&chainId=42&page=3&perPage=50`;
|
||||
fetchMock.get(urlWithQuery, ordersResponseJSON);
|
||||
const orders = await relayerClient.getOrdersAsync(ordersRequest);
|
||||
expect(orders).to.be.deep.equal(ordersResponse);
|
||||
@@ -120,12 +120,12 @@ describe('HttpClient', () => {
|
||||
it('gets orderbook with specified page options', async () => {
|
||||
const urlWithQuery = `${url}?baseAssetData=${
|
||||
request.baseAssetData
|
||||
}&networkId=42&page=3&perPage=50"eAssetData=${request.quoteAssetData}`;
|
||||
}&chainId=42&page=3&perPage=50"eAssetData=${request.quoteAssetData}`;
|
||||
fetchMock.get(urlWithQuery, orderbookJSON);
|
||||
const pagedRequestOptions = {
|
||||
page: 3,
|
||||
perPage: 50,
|
||||
networkId: 42,
|
||||
chainId: 42,
|
||||
};
|
||||
const orderbook = await relayerClient.getOrderbookAsync(request, pagedRequestOptions);
|
||||
expect(orderbook).to.be.deep.equal(orderbookResponse);
|
||||
@@ -175,12 +175,12 @@ describe('HttpClient', () => {
|
||||
expect(feeRecipients).to.be.deep.equal(feeRecipientsResponse);
|
||||
});
|
||||
it('gets fee recipient with specified page options', async () => {
|
||||
const urlWithQuery = `${url}?networkId=42&page=3&perPage=50`;
|
||||
const urlWithQuery = `${url}?chainId=42&page=3&perPage=50`;
|
||||
fetchMock.get(urlWithQuery, feeRecipientsResponseJSON);
|
||||
const pagedRequestOptions = {
|
||||
page: 3,
|
||||
perPage: 50,
|
||||
networkId: 42,
|
||||
chainId: 42,
|
||||
};
|
||||
const feeRecipients = await relayerClient.getFeeRecipientsAsync(pagedRequestOptions);
|
||||
expect(feeRecipients).to.be.deep.equal(feeRecipientsResponse);
|
||||
|
Reference in New Issue
Block a user