Skip to content
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
17 changes: 0 additions & 17 deletions __tests__/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,23 +391,6 @@ describe('deploy and test Account', () => {
});

describe('fastExecute()', () => {
test('Only Rpc X', async () => {
const provider08 = new RpcProvider({
nodeUrl: 'dummy',
blockIdentifier: BlockTag.PRE_CONFIRMED,
specVersion: '0.10.0',
});
const testAccount = new Account({
provider: provider08,
address: '0x123',
signer: '0x456',
});
const myCall: Call = { contractAddress: '0x036', entrypoint: 'withdraw', calldata: [] };
await expect(testAccount.fastExecute(myCall)).rejects.toThrow(
'Wrong Rpc version in Provider. At least Rpc v0.9 required.'
);
});

test('Only provider with PRE_CONFIRMED blockIdentifier', async () => {
const providerLatest = new RpcProvider({
nodeUrl: 'dummy',
Expand Down
5 changes: 0 additions & 5 deletions src/account/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ import { assertPaymasterTransactionSafety } from '../utils/paymaster';
import assert from '../utils/assert';
import { defaultDeployer, Deployer } from '../deployer';
import type { TipType } from '../provider/modules/tip';
import { RPC09 } from '../channel';

export class Account extends Provider implements AccountInterface {
public signer: SignerInterface;
Expand Down Expand Up @@ -365,10 +364,6 @@ export class Account extends Provider implements AccountInterface {
transactionsDetail: UniversalDetails = {},
waitDetail: fastWaitForTransactionOptions = {}
): Promise<fastExecuteResponse> {
assert(
this.channel instanceof RPC09.RpcChannel,
'Wrong Rpc version in Provider. At least Rpc v0.9 required.'
);
assert(
this.channel.blockIdentifier === BlockTag.PRE_CONFIRMED,
'Provider needs to be initialized with `pre_confirmed` blockIdentifier option.'
Expand Down
17 changes: 7 additions & 10 deletions src/provider/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,13 @@ export class RpcProvider implements ProviderInterface {
initNonce: BigNumberish,
options?: fastWaitForTransactionOptions
): Promise<boolean> {
if (this.channel instanceof RPC09.RpcChannel) {
const isSuccess = await this.channel.fastWaitForTransaction(
txHash,
address,
initNonce,
options
);
return isSuccess;
}
throw new Error('Unsupported channel type');
const isSuccess = await this.channel.fastWaitForTransaction(
txHash,
address,
initNonce,
options
);
return isSuccess;
}

public async getStorageAt(
Expand Down
Loading