Skip to content

Commit

Permalink
Fix read state payload reset on empty argument (#1398)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov authored Sep 15, 2023
1 parent 35ac18c commit 88f23c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utils/gear-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gear-js/react-hooks",
"version": "0.6.4",
"version": "0.6.5",
"description": "React hooks used across Gear applications",
"author": "Gear Technologies",
"license": "GPL-3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AlertContext, ApiContext } from 'context';
function useReadFullState<T = AnyJson>(
programId: HexString | undefined,
meta: ProgramMetadata | undefined,
payload: AnyJson = '0x',
payload: AnyJson,
isReadOnError?: boolean,
) {
const { api } = useContext(ApiContext); // сircular dependency fix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Args = {
};

function useReadWasmState<T = AnyJson>(args: Args, isReadOnError?: boolean) {
const { programId, wasm, programMetadata, functionName, payload = '0x', argument } = args;
const { programId, wasm, programMetadata, functionName, payload, argument } = args;

const { api } = useContext(ApiContext); // сircular dependency fix
const alert = useContext(AlertContext);
Expand Down

0 comments on commit 88f23c2

Please sign in to comment.