Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
fix: 105 not correct decoding of i16 edge values (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
peetzweg authored Nov 17, 2023
1 parent d24cde2 commit ecd61d6
Show file tree
Hide file tree
Showing 10 changed files with 368 additions and 1,808 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm install --frozen-lockfile
- name: Lint code
run: pnpm lint:ci
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: echo "tag_version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: Install Dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Build NPM Package
run: pnpm build
Expand Down
11 changes: 9 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,22 @@
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentSize": 2,
"indentWidth": 2,
"lineWidth": 80
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "error"
"noUnusedVariables": "error",
"useExhaustiveDependencies": "off"
},
"complexity": {
"noForEach": "off"
},
"performance": {
"noAccumulatingSpread": "off"
}
}
},
Expand Down
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
"lint:ci": "biome ci ."
},
"dependencies": {
"@polkadot/api": "^10.9.1",
"@polkadot/api-contract": "^10.9.1",
"@polkadot/api-derive": "^10.9.1",
"@polkadot/extension-dapp": "^0.46.5",
"@polkadot/extension-inject": "^0.46.5",
"@polkadot/util": "^12.3.2",
"@polkadot/util-crypto": "^12.3.2",
"@polkadot/api-contract": "^10.10.1",
"@polkadot/api-derive": "^10.10.1",
"@polkadot/api": "^10.10.1",
"@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.5.1",
"@talismn/connect-wallets": "^1.2.3"
},
"devDependencies": {
"@biomejs/biome": "^1.2.2"
"@biomejs/biome": "^1.3.3"
},
"packageManager": "pnpm@8.6.1"
"packageManager": "pnpm@8.10.5"
}
13 changes: 6 additions & 7 deletions packages/useink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@
"lint": "tsc",
"release": "pnpm run build && changeset publish"
},
"dependencies": {
"nanoid": "3"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
"@polkadot/types": "^10.9.1",
"@polkadot/types-codec": "^10.9.1",
"@polkadot/types": "^10.10.1",
"@polkadot/types-codec": "^10.10.1",
"@types/react": "^18.2.7",
"tsup": "^6.7.0",
"typescript": "^5.0.4"
},
"peerDependencies": {
"react": "^18.0.0",
"react": "^18",
"ws": "^8.13.0"
},
"exports": {
Expand Down Expand Up @@ -88,8 +90,5 @@
"default": "./dist/utils.js"
}
}
},
"dependencies": {
"nanoid": "3"
}
}
1 change: 0 additions & 1 deletion packages/useink/src/core/types/api-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export type {
} from '@polkadot/api-contract/types';
export { Abi, ContractPromise } from '@polkadot/api-contract';

// biome-ignore lint/correctness/noUnusedVariables: The Release flow breaks when exporting from '@polkadot/api-contract/base/contract';
export declare class ContractSubmittableResult extends SubmittableResult {
readonly contractEvents?: DecodedEvent[] | undefined;
constructor(result: ISubmittableResult, contractEvents?: DecodedEvent[]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export type DeploySignAndSend<T> = (

export type DeployTx = SubmittableExtrinsic<'promise', ISubmittableResult>;

export interface Deploy<T> {
export interface Deploy<_T> {
dryRun: DeploySignAndSend<Promise<DeployTx | undefined>>;
signAndSend: DeploySignAndSend<Promise<void>>;
contractAddress: string | undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/useink/src/react/hooks/contracts/useTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type SignAndSend = (
cb?: ContractSubmittableResultCallback,
) => void;

export interface Tx<T> {
export interface Tx<_T> {
signAndSend: SignAndSend;
status: TransactionStatus;
result: ContractSubmittableResult | undefined;
Expand Down
2 changes: 1 addition & 1 deletion playground/src/components/pg-home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const HomePage: React.FC = () => {
[],
{ defaultCaller: true },
);
const flipTx = useTx<void>(cRococoContract, 'flip');
const flipTx = useTx(cRococoContract, 'flip');
const flipDryRun = useDryRun<boolean>(cRococoContract, 'flip');
const flipPaymentInfo = useTxPaymentInfo(cRococoContract, 'flip');
const panic = useCall<boolean>(cRococoContract, 'panic');
Expand Down
Loading

0 comments on commit ecd61d6

Please sign in to comment.