Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enforce base package to build first #118

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/create-forked-network/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function main() {
name: 'MyForkedNetwork',
forkedNetwork: 'mainnet',
rpcUrl: '', // Add your RPC URL here
})
});

console.log(network);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"nx-build-test-skip-cache": "pnpm run build-test --skip-nx-cache",
"nx-test-skip-cache": "pnpm run test --skip-nx-cache",
"build": "nx run-many -t build --parallel=1",
"build-test": "nx run-many -t style,build,test",
"build-test": "nx run-many -t style,build,test --projects=@openzeppelin/defender-base-client,* --parallel=false",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the relevant change, the rest are just pre-commit format changes

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be necessary since parallel=1 should still run sequentially. Is it not the case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to work :/ it tries to run notification-channel:build before base:build.

By the docs it seems tha the way to run secuentially is by setting parallel=false

Screenshot 2023-10-05 at 15 08 17

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Sounds good. Thanks

"lint:check": "eslint 'packages/**/src/**/*.{js,ts}' --quiet",
"lint:fix": "pnpm prettier:fix && pnpm lint:check && pnpm prettier:check",
"prettier:check": "prettier --check '**/*.{js,ts,tsx}'",
Expand Down
7 changes: 6 additions & 1 deletion packages/relay-signer/src/models/relayer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import https from 'https';
import { Network } from '@openzeppelin/defender-sdk-base-client';
import { ListTransactionsRequest, PaginatedTransactionResponse, RelayerTransaction, RelayerTransactionPayload } from './transactions';
import {
ListTransactionsRequest,
PaginatedTransactionResponse,
RelayerTransaction,
RelayerTransactionPayload,
} from './transactions';
import { JsonRpcResponse, SignMessagePayload, SignTypedDataPayload, SignedMessagePayload } from './rpc';

// TODO Defender Address model for this
Expand Down
3 changes: 1 addition & 2 deletions packages/relay-signer/src/models/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ export type ListTransactionsRequest = {
usePagination?: boolean;
};


export type PaginatedTransactionResponse = {
items: RelayerTransaction[];
next?: string;
}
};
11 changes: 9 additions & 2 deletions packages/relay-signer/src/relayer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { IRelayer, RelayerGetResponse, RelayerParams } from './models/relayer';
import { JsonRpcResponse, SignMessagePayload, SignTypedDataPayload, SignedMessagePayload } from './models/rpc';
import { ListTransactionsRequest, PaginatedTransactionResponse, RelayerTransaction, RelayerTransactionPayload } from './models/transactions';
import {
ListTransactionsRequest,
PaginatedTransactionResponse,
RelayerTransaction,
RelayerTransactionPayload,
} from './models/transactions';
import { isApiCredentials, isActionCredentials, validatePayload } from './ethers/utils';
import { RelaySignerClient } from './api';
import { DefenderRelayProvider, DefenderRelaySigner, DefenderRelaySignerOptions } from './ethers';
Expand Down Expand Up @@ -66,7 +71,9 @@ export class Relayer implements IRelayer {
return this.relayer.getTransaction(id);
}

public listTransactions(criteria?: ListTransactionsRequest): Promise<RelayerTransaction[] | PaginatedTransactionResponse> {
public listTransactions(
criteria?: ListTransactionsRequest,
): Promise<RelayerTransaction[] | PaginatedTransactionResponse> {
return this.relayer.listTransactions(criteria);
}

Expand Down