fix: temp fix for wasm in redstone loader

This commit is contained in:
ppedziwiatr
2022-03-05 15:39:57 +01:00
committed by Piotr Pędziwiatr
parent ae2332d3d9
commit b529e7bc7c
4 changed files with 4 additions and 6 deletions

View File

@@ -52,7 +52,6 @@
"homepage": "https://github.com/redstone-finance/redstone-smartweave#readme",
"dependencies": {
"@assemblyscript/loader": "^0.19.23",
"@ungap/structured-clone": "^0.3.4",
"@weavery/clarity": "^0.1.5",
"arweave": "1.10.23",
"arweave-multihost": "^0.1.0",

View File

@@ -289,8 +289,6 @@ describe('Testing internal writes', () => {
.setEvaluationOptions({ internalWrites: true })
.connect(wallet);
LoggerFactory.INST.logLevel('debug');
expect((await contractA2.readState()).state.counter).toEqual(-805);
expect((await contractB2.readState()).state.counter).toEqual(2060);
});

View File

@@ -53,7 +53,7 @@ describe('Testing the SmartWeave client', () => {
protocol: 'http'
});
LoggerFactory.INST.logLevel('debug');
LoggerFactory.INST.logLevel('error');
smartweave = await SmartWeaveNodeFactory.knexCached(arweave, knexConfig);

View File

@@ -42,9 +42,10 @@ export class RedstoneGatewayContractDefinitionLoader extends ContractDefinitionL
`Unable to retrieve contract data. Redstone gateway responded with status ${error.status}:${error.body?.message}`
);
});
if (result.srcBinary != null && !(result.srcBinary instanceof Buffer)) {
result.contractType = 'js'; // TODO: Add support in redstone gateway
/* if (result.srcBinary != null && !(result.srcBinary instanceof Buffer)) {
result.srcBinary = Buffer.from((result.srcBinary as any).data);
}
}*/
return result;
} catch (e) {
this.rLogger.warn('Falling back to default contracts loader', e);