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

fix: en_7 recommendations... #1749

Merged
merged 26 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4bdd5ba
fix: fr9 recommendations
lucanicoladebiasi Jan 23, 2025
06df2ca
Merge branch 'main' into 1656-fr9
lucanicoladebiasi Jan 24, 2025
13df8ea
Merge branch 'main' into 1656-fr9
lucanicoladebiasi Jan 24, 2025
c56175c
fix: en_1 recommendations
lucanicoladebiasi Jan 24, 2025
e67a976
fix: en_1 recommendations
lucanicoladebiasi Jan 24, 2025
6557df6
Merge branch 'main' into 1661-en_2
lucanicoladebiasi Jan 24, 2025
e103e73
fix: en_2 recommendations...
lucanicoladebiasi Jan 25, 2025
0de0e92
fix: en_2 recommendations...
lucanicoladebiasi Jan 25, 2025
66dbfd7
Merge remote-tracking branch 'origin/1661-en_2' into 1661-en_2
lucanicoladebiasi Jan 26, 2025
40508b5
Merge branch 'main' into 1656-fr9
fabiorigam Jan 27, 2025
06a7788
fix: en_7 recommendations...
lucanicoladebiasi Jan 27, 2025
1908cc8
fix: en_7 recommendations...
lucanicoladebiasi Jan 27, 2025
da1bebe
fix: n_7 recommandations
lucanicoladebiasi Jan 28, 2025
893b4b7
fix: n_7 recommandations
lucanicoladebiasi Jan 28, 2025
3227375
Merge remote-tracking branch 'origin/1662-en_7' into 1662-en_7
lucanicoladebiasi Jan 28, 2025
7763237
Merge branch 'main' into 1656-fr9
fabiorigam Jan 27, 2025
b2cc8b4
Merge remote-tracking branch 'origin/1656-fr9' into 1656-fr9
lucanicoladebiasi Jan 28, 2025
376b805
Merge branch '1656-fr9' into 1661-en_2
lucanicoladebiasi Jan 28, 2025
6af3507
Merge branch 'main' into 1656-fr9
lucanicoladebiasi Jan 28, 2025
81a99dd
Merge branch '1661-en_2' into 1662-en_7
lucanicoladebiasi Jan 28, 2025
5098418
Merge branch 'main' into 1662-en_7
lucanicoladebiasi Jan 28, 2025
6f770b8
Merge branch '1661-en_2' into 1662-en_7
lucanicoladebiasi Jan 28, 2025
bc93ea0
Merge branch 'main' into 1662-en_7
lucanicoladebiasi Jan 31, 2025
6946e6e
fix: EN_7
lucanicoladebiasi Jan 31, 2025
cfb6697
fix: EN_7
lucanicoladebiasi Jan 31, 2025
5d30fb8
fix: EN_7
lucanicoladebiasi Jan 31, 2025
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
8 changes: 4 additions & 4 deletions apps/sdk-cloudflare-integration/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"compilerOptions": {
"strict": true,
"module": "esnext",
"target": "esnext",
"module": "Node16",
"target": "ES2023",
"lib": [
"esnext"
],
"moduleResolution": "bundler",
"moduleResolution": "Node16",
"noEmit": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
Expand All @@ -18,4 +18,4 @@
"./**/*.ts"
]
}
}
}
6 changes: 3 additions & 3 deletions apps/sdk-nextjs-integration/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"module": "Node16",
"moduleResolution": "Node16",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
Expand All @@ -30,7 +30,7 @@
"**/*.ts",
"**/*.tsx",
"types.d.ts",
".next/types/**/*.ts",
".next/types/**/*.ts",
"jest.config.js" ],
"exclude": ["node_modules"]
}
6 changes: 3 additions & 3 deletions apps/sdk-vite-integration/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { BrowserRouter as Router, Route, Routes, Link } from 'react-router-dom';
import reactLogo from './assets/react.svg';
import viteLogo from '/vite.svg';
import './App.css';
import Hash from './components/Hash';
import TransferLogs from './components/TransferLogs';
import GetLastBlock from './components/GetLastBlock';
import Hash from './components/Hash.tsx';
import TransferLogs from './components/TransferLogs.tsx';
import GetLastBlock from './components/GetLastBlock.tsx';

function App() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type CompressedBlockDetail } from "@vechain/sdk-network";
import { useState } from "react";
import { thorClient } from "../const";
import { thorClient } from '../const/index.tsx';

const GetLastBlock = () => {
const [block, setBlock] = useState<CompressedBlockDetail | null>(null);
Expand Down
2 changes: 1 addition & 1 deletion apps/sdk-vite-integration/src/components/Hash.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Blake2b256, Keccak256, Sha256, Txt } from '@vechain/sdk-core';
import { useEffect, useState } from 'react';
import { HashedContent } from '../types';
import { HashedContent } from '../types/index.tsx';

const Hash = () => {
// State of content to hash
Expand Down
4 changes: 2 additions & 2 deletions apps/sdk-vite-integration/src/components/TransferLogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
FilterTransferLogsOptions
} from '@vechain/sdk-network';
import { Link } from 'react-router-dom';
import { Transfer } from "../types";
import { explorerUrl, thorClient } from "../const";
import { Transfer } from "../types/index.tsx";
import { explorerUrl, thorClient } from "../const/index.tsx";
lucanicoladebiasi marked this conversation as resolved.
Show resolved Hide resolved

/**
* Reduce the size of a hex string
Expand Down
2 changes: 1 addition & 1 deletion apps/sdk-vite-integration/src/const/index.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// eslint-disable-next-line react-refresh/only-export-components
export * from './const';
export * from '../const/const.tsx';
2 changes: 1 addition & 1 deletion apps/sdk-vite-integration/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App'
import App from './App.tsx'
lucanicoladebiasi marked this conversation as resolved.
Show resolved Hide resolved

createRoot(document.getElementById('root')!).render(
<StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion apps/sdk-vite-integration/src/types/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type * from './types.d';
export type * from './types.d.tsx';
4 changes: 2 additions & 2 deletions apps/sdk-vite-integration/tests/Hash.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { expect, test } from 'vitest'
import { render } from 'vitest-browser-react'
import Hash from '../src/components/Hash'
import Hash from '../src/components/Hash.js'

test('renders name', async () => {
const { getByText } = render(<Hash />)

await expect.element(getByText('0xbf56c0728fd4e9cf64bfaf6dabab81554103298cdee5cc4d580433aa25e98b00')).toBeInTheDocument()
})
})
4 changes: 2 additions & 2 deletions apps/sdk-vite-integration/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"module": "Node16",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "Bundler",
"moduleResolution": "Node16",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
Expand Down
21 changes: 11 additions & 10 deletions apps/sdk-vite-integration/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": ["esnext", "dom"],
"module": "ESNext",
"moduleResolution": "Bundler",
"jsx": "react-jsx",
"types": ["@vitest/browser/providers/playwright"],
"strict": true,
"allowImportingTsExtensions": true,
"declaration": true,
"noEmit": true,
"esModuleInterop": true,
"skipLibCheck": true
"jsx": "react-jsx",
"lib": ["esnext", "dom"],
"module": "Node16",
"moduleResolution": "Node16",
"noEmit": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2023",
"types": ["@vitest/browser/providers/playwright"]
}
}
}
4 changes: 2 additions & 2 deletions apps/sdk-vite-integration/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"module": "Node16",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "Bundler",
"moduleResolution": "Node16",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
Expand Down
14 changes: 7 additions & 7 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"target": "ES2023",
"module": "Node16",
"moduleResolution": "Node16",
"allowSyntheticDefaultImports": true,
},
"ts-node": {
"compilerOptions": {
"esModuleInterop": true,
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Node",
"module": "Node16",
"target": "ES2023",
"moduleResolution": "Node16",
},
"esm": true
}
}
}
11 changes: 8 additions & 3 deletions packages/aws-kms-adapter/tests/KMSVeChainSigner.solo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import {
Transaction,
type TransactionClause
} from '@vechain/sdk-core';
import { signerUtils, THOR_SOLO_URL, ThorClient } from '@vechain/sdk-network';
import {
signerUtils,
THOR_SOLO_URL,
ThorClient,
type TypedDataDomain
} from '@vechain/sdk-network';
import fs from 'fs';
import path from 'path';
import {
Expand Down Expand Up @@ -297,7 +302,7 @@ describe('KMSVeChainSigner - Thor Solo', () => {
}
};
const signature = await signer.signTypedData(
typedData.domain,
typedData.domain as TypedDataDomain,
typedData.types,
typedData.data,
typedData.primaryType
Expand All @@ -307,7 +312,7 @@ describe('KMSVeChainSigner - Thor Solo', () => {
expect(signature).toMatch(/^0x[A-Fa-f0-9]{130}$/);

const signatureWithoutPrimaryType = await signer.signTypedData(
typedData.domain,
typedData.domain as TypedDataDomain,
typedData.types,
typedData.data
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Wallet } from 'ethers';
import {
TESTNET_URL,
ThorClient,
type TypedDataDomain,
VeChainPrivateKeySigner,
VeChainProvider,
vnsUtils
Expand Down Expand Up @@ -293,7 +294,7 @@ describe('VeChain base signer tests', () => {
);
await expect(
signer.signTypedData(
eip712TestCases.invalid.domain,
eip712TestCases.invalid.domain as TypedDataDomain,
eip712TestCases.invalid.types,
eip712TestCases.invalid.data,
eip712TestCases.invalid.primaryType
Expand All @@ -317,7 +318,7 @@ describe('VeChain base signer tests', () => {
});
await expect(
signer.signTypedData(
eip712TestCases.valid.domain,
eip712TestCases.valid.domain as TypedDataDomain,
eip712TestCases.valid.types,
eip712TestCases.valid.data,
eip712TestCases.valid.primaryType
Expand All @@ -326,7 +327,7 @@ describe('VeChain base signer tests', () => {

await expect(
signer.signTypedData(
eip712TestCases.valid.domain,
eip712TestCases.valid.domain as TypedDataDomain,
eip712TestCases.valid.types,
eip712TestCases.valid.data,
eip712TestCases.valid.primaryType
Expand All @@ -348,15 +349,15 @@ describe('VeChain base signer tests', () => {
provider
);
const actual = await privateKeySigner.signTypedData(
eip712TestCases.valid.domain,
eip712TestCases.valid.domain as TypedDataDomain,
eip712TestCases.valid.types,
eip712TestCases.valid.data,
eip712TestCases.valid.primaryType
);
expect(actual).toBe(expected);
const actualWithoutPrimaryType =
await privateKeySigner.signTypedData(
eip712TestCases.valid.domain,
eip712TestCases.valid.domain as TypedDataDomain,
eip712TestCases.valid.types,
eip712TestCases.valid.data
);
Expand All @@ -378,7 +379,7 @@ describe('VeChain base signer tests', () => {
const actualWithStringChainId =
await privateKeySigner.signTypedData(
{
...eip712TestCases.valid.domain,
...(eip712TestCases.valid.domain as TypedDataDomain),
chainId: vechainChainId
},
eip712TestCases.valid.types,
Expand All @@ -389,7 +390,7 @@ describe('VeChain base signer tests', () => {
const actualWithBigintChainId =
await privateKeySigner.signTypedData(
{
...eip712TestCases.valid.domain,
...(eip712TestCases.valid.domain as TypedDataDomain),
chainId: BigInt(vechainChainId)
},
eip712TestCases.valid.types,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, test } from '@jest/globals';
import { ERC20_ABI, HexUInt } from '@vechain/sdk-core';
import { Address, ERC20_ABI, HexUInt } from '@vechain/sdk-core';
import { InvalidAbiItem } from '@vechain/sdk-errors';
import {
THOR_SOLO_URL,
Expand Down Expand Up @@ -101,7 +101,7 @@ describe('ThorClient - ERC20 Contracts', () => {
const eventsWithAnArgsObject = await contract.filters
.Transfer({
from: undefined,
to: TEST_ACCOUNTS.TRANSACTION.TRANSACTION_RECEIVER.address
to: `0x${Address.of(TEST_ACCOUNTS.TRANSACTION.TRANSACTION_RECEIVER.address).digits}`
})
.get();

Expand Down Expand Up @@ -476,7 +476,7 @@ describe('ThorClient - ERC20 Contracts', () => {
await (await contractEventExample.transact.setValue(3000n)).wait();

const transferCriteria = contractERC20.criteria.Transfer({
to: TEST_ACCOUNTS.TRANSACTION.TRANSACTION_RECEIVER.address
to: `0x${Address.of(TEST_ACCOUNTS.TRANSACTION.TRANSACTION_RECEIVER.address).digits}`
});

const valueCriteria = contractEventExample.criteria.ValueSet();
Expand Down Expand Up @@ -537,7 +537,7 @@ describe('ThorClient - ERC20 Contracts', () => {
await (await contractEventExample.transact.setValue(3000n)).wait();

const transferCriteria = contractERC20.criteria.Transfer({
to: TEST_ACCOUNTS.TRANSACTION.TRANSACTION_RECEIVER.address
to: `0x${Address.of(TEST_ACCOUNTS.TRANSACTION.TRANSACTION_RECEIVER.address).digits}`
});

const valueCriteria = contractEventExample.criteria.ValueSet();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ describe('ThorClient - Contracts', () => {
.StateChanged({
newValue: undefined,
oldValue: undefined,
sender: TEST_ACCOUNTS.TRANSACTION.TRANSACTION_SENDER.address
sender: `0x${Address.of(TEST_ACCOUNTS.TRANSACTION.TRANSACTION_SENDER.address).digits}`
})
.get();

Expand Down
8 changes: 4 additions & 4 deletions packages/rpc-proxy/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"rootDir": "./src",
"outDir": "./dist",
"strict": true,
"target": "es2020",
"module": "commonjs",
"target": "es2023",
"module": "Node16",
"sourceMap": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"moduleResolution": "node"
"moduleResolution": "Node16"
},
"include": [
"./src/**/*.ts",
"./tests/**/*.ts"
]
}
}
10 changes: 5 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"module": "ESNext",
"target": "ESNext",
"module": "Node16",
"target": "ES2023",
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"moduleResolution": "node",
"moduleResolution": "Node16",
"noUnusedLocals": false,
"noUnusedParameters": false,
"preserveWatchOutput": true,
Expand All @@ -22,7 +22,7 @@
"ts-node": {
// these options are overrides used only by ts-node
"compilerOptions": {
"module": "commonjs"
"module": "Node16"
}
},
}
}
Loading