From ee98e79e85a595bd072b6b42d310eeb6afeec0b5 Mon Sep 17 00:00:00 2001 From: Doris Benda Date: Wed, 16 Aug 2023 17:15:42 +0200 Subject: [PATCH] Address comments --- examples/eSealing/package.json | 1 - examples/eSealing/src/eSealing.tsx | 4 ++-- examples/eSealing/src/utils.ts | 4 ++-- yarn.lock | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/eSealing/package.json b/examples/eSealing/package.json index ae2d39645..be2071ed8 100644 --- a/examples/eSealing/package.json +++ b/examples/eSealing/package.json @@ -5,7 +5,6 @@ "license": "Apache-2.0", "dependencies": { "@concordium/react-components": "^0.3.0", - "@concordium/web-sdk": "^3.3.1", "@thi.ng/leb128": "^2.1.18", "@types/sha256": "^0.2.0", "@walletconnect/types": "^2.1.4", diff --git a/examples/eSealing/src/eSealing.tsx b/examples/eSealing/src/eSealing.tsx index 62b3ece36..444eea1ce 100644 --- a/examples/eSealing/src/eSealing.tsx +++ b/examples/eSealing/src/eSealing.tsx @@ -156,7 +156,7 @@ export default function SEALING(props: WalletConnectionProps) { useEffect(() => { // View file record. - if (grpcClient && account && fileHashHex !== '') { + if (grpcClient && fileHashHex !== '') { viewFile(grpcClient, fileHashHex) .then((record) => { setGetFileError(''); @@ -169,7 +169,7 @@ export default function SEALING(props: WalletConnectionProps) { setWitness(''); }); } - }, [grpcClient, account, fileHashHex]); + }, [grpcClient, fileHashHex]); const [isRegisterFilePage, setIsRegisterFilePage] = useState(true); const [hash, setHash] = useState(''); diff --git a/examples/eSealing/src/utils.ts b/examples/eSealing/src/utils.ts index 78403905c..a46c31935 100644 --- a/examples/eSealing/src/utils.ts +++ b/examples/eSealing/src/utils.ts @@ -1,5 +1,5 @@ import { createContext } from 'react'; -import { AccountTransactionType, CcdAmount, UpdateContractPayload } from '@concordium/web-sdk'; +import { AccountTransactionType, CcdAmount } from '@concordium/web-sdk'; import { WalletConnection, moduleSchemaFromBase64 } from '@concordium/react-components'; import { E_SEALING_CONTRACT_NAME, E_SEALING_RAW_SCHEMA } from './constants'; @@ -24,7 +24,7 @@ export async function register( }, receiveName: `${E_SEALING_CONTRACT_NAME}.registerFile`, maxContractExecutionEnergy: 30000n, - } as UpdateContractPayload, + }, { parameters: fileHashHex, schema: moduleSchemaFromBase64(E_SEALING_RAW_SCHEMA), diff --git a/yarn.lock b/yarn.lock index 8d1dc54cc..4f4c97f66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10205,7 +10205,6 @@ __metadata: resolution: "e_sealing@workspace:examples/eSealing" dependencies: "@concordium/react-components": ^0.3.0 - "@concordium/web-sdk": ^3.3.1 "@craftamap/esbuild-plugin-html": ^0.4.0 "@thi.ng/leb128": ^2.1.18 "@types/node": ^18.7.23