Skip to content

Commit

Permalink
Merge branch 'develop' into feat/deprecate-legacy-tx
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni authored Jan 28, 2025
2 parents 6b4bc53 + 8fb2193 commit 2447173
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# TODO - periodically check if conditional services are supported; https://github.com/actions/runner/issues/822
services:
devnet:
image: ${{ (inputs.use-devnet) && 'shardlabs/starknet-devnet-rs:0.2.2' || '' }}
image: ${{ (inputs.use-devnet) && 'shardlabs/starknet-devnet-rs:0.2.4' || '' }}
ports:
- 5050:5050

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [6.21.1](https://github.com/starknet-io/starknet.js/compare/v6.21.0...v6.21.1) (2025-01-23)

### Bug Fixes

- pass signerDetails to fix estimateFeeBulk ([#1299](https://github.com/starknet-io/starknet.js/issues/1299)) ([f09f20d](https://github.com/starknet-io/starknet.js/commit/f09f20da47396456350d26610dabd2e2641a5a98))

# [6.21.0](https://github.com/starknet-io/starknet.js/compare/v6.20.3...v6.21.0) (2025-01-08)

### Bug Fixes
Expand Down
19 changes: 7 additions & 12 deletions __tests__/rpcProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
waitNextBlock,
} from './config/fixtures';
import { initializeMatcher } from './config/schema';
import { isBoolean } from '../src/utils/typed';

describeIfRpc('RPCProvider', () => {
const rpcProvider = getTestProvider(false);
Expand Down Expand Up @@ -307,16 +308,17 @@ describeIfRpc('RPCProvider', () => {
expect(Array.isArray(transactions)).toBe(true);
});

test('getSyncingStats', async () => {
const syncingStats = await rpcProvider.getSyncingStats();
expect(syncingStats).toMatchSchemaRef('GetSyncingStatsResponse');
if (isBoolean(syncingStats)) expect(syncingStats).toBe(false);
});

xtest('traceBlockTransactions', async () => {
await rpcProvider.getBlockTransactionsTraces(latestBlock.block_hash);
});

describeIfDevnet('devnet only', () => {
test('getSyncingStats', async () => {
const syncingStats = await rpcProvider.getSyncingStats();
expect(syncingStats).toBe(false);
});

test('getEvents ', async () => {
const randomWallet = stark.randomAddress();
const classHash = '0x011ab8626b891bcb29f7cc36907af7670d6fb8a0528c7944330729d8f01e9ea3';
Expand Down Expand Up @@ -440,13 +442,6 @@ describeIfRpc('RPCProvider', () => {
});
});
});

describeIfNotDevnet('global rpc only', () => {
test('getSyncingStats', async () => {
const syncingStats = await rpcProvider.getSyncingStats();
expect(syncingStats).toMatchSchemaRef('GetSyncingStatsResponse');
});
});
});

describeIfTestnet('RPCProvider', () => {
Expand Down
9 changes: 8 additions & 1 deletion __tests__/schemas/rpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
"$id": "rpcSchemas",
"definitions": {
"GetSyncingStatsResponse": {
"$ref": "starknet_api_openrpc#/components/schemas/SYNC_STATUS"
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "starknet_api_openrpc#/components/schemas/SYNC_STATUS"
}
]
},
"StarknetEmittedEvent": {
"$ref": "starknet_api_openrpc#/components/schemas/EMITTED_EVENT"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "starknet",
"version": "6.21.0",
"version": "6.21.1",
"description": "JavaScript library for Starknet",
"license": "MIT",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions src/account/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,7 @@ export class Account extends Provider implements AccountInterface {
return {
...common,
...payload,
...signerDetails,
};
}
if (transaction.type === TransactionType.DEPLOY) {
Expand All @@ -1003,6 +1004,7 @@ export class Account extends Provider implements AccountInterface {
return {
...common,
...payload,
...signerDetails,
type: TransactionType.INVOKE,
};
}
Expand All @@ -1016,6 +1018,7 @@ export class Account extends Provider implements AccountInterface {
return {
...common,
...payload,
...signerDetails,
};
}
if (transaction.type === TransactionType.DEPLOY_ACCOUNT) {
Expand All @@ -1028,6 +1031,7 @@ export class Account extends Provider implements AccountInterface {
return {
...common,
...payload,
...signerDetails,
};
}
throw Error(`accountInvocationsFactory: unsupported transaction type: ${transaction}`);
Expand Down

0 comments on commit 2447173

Please sign in to comment.