summaryrefslogtreecommitdiff
path: root/impls/monero.ts/checksum.ts
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2025-01-05 13:17:22 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2025-01-05 13:17:22 +0100
commit085d74b37b478be77bc873d66876247a751aa957 (patch)
treed8434dd9c8c57df9b64ae93059d9ebb5a16b90f2 /impls/monero.ts/checksum.ts
parent8e7bc59509c40f00702ba568a0adcb3cf82e6e05 (diff)
parentc3dd64bdee37d361a2c1252d127fb575936e43e6 (diff)
Merge remote-tracking branch 'origin/develop' into rust-develop
Diffstat (limited to 'impls/monero.ts/checksum.ts')
-rw-r--r--impls/monero.ts/checksum.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/impls/monero.ts/checksum.ts b/impls/monero.ts/checksum.ts
index b0d12b0..81140d3 100644
--- a/impls/monero.ts/checksum.ts
+++ b/impls/monero.ts/checksum.ts
@@ -1,6 +1,6 @@
import { moneroChecksum } from "./checksum_monero.ts";
-import { getSymbol, readCString } from "./src/utils.ts";
-import { dylib, loadMoneroDylib } from "./src/bindings.ts";
+import { readCString } from "./src/utils.ts";
+import { fns, loadMoneroDylib } from "./src/bindings.ts";
loadMoneroDylib();
@@ -21,7 +21,7 @@ export class ChecksumError extends Error {
* @returns {ChecksumError} which contains information about why checksum failed
*/
export async function validateChecksum(): Promise<ChecksumError | null> {
- const cppHeaderHash = await readCString(await getSymbol("checksum_wallet2_api_c_h")!(), false);
+ const cppHeaderHash = await readCString(await fns.checksum_wallet2_api_c_h!(), false);
const tsHeaderHash = moneroChecksum.wallet2_api_c_h_sha256;
const errors: string[] = [];
@@ -32,14 +32,14 @@ export async function validateChecksum(): Promise<ChecksumError | null> {
errorCode++;
}
- const cppSourceHash = await readCString(await getSymbol("checksum_wallet2_api_c_cpp")!(), false);
+ const cppSourceHash = await readCString(await fns.checksum_wallet2_api_c_cpp!(), false);
const tsSourceHash = moneroChecksum.wallet2_api_c_cpp_sha256;
if (cppSourceHash !== tsSourceHash) {
errors.push(`ERR: CPP source file check mismatch ${cppSourceHash} == ${tsSourceHash}`);
errorCode++;
}
- const cppExportHash = await readCString(await getSymbol("checksum_wallet2_api_c_exp")!(), false);
+ const cppExportHash = await readCString(await fns.checksum_wallet2_api_c_exp!(), false);
const tsExportHash = moneroChecksum.wallet2_api_c_exp_sha256;
if (cppExportHash !== tsExportHash) {
if (Deno.build.os !== "darwin") {