Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Set insecure flag for gateways #109

Draft
wants to merge 1 commit into
base: beta
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/6_test_deploy_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ if (truffleConfig.shouldRun(__filename)) {
contract('Deploy Header', async (accounts) => {
let labels = ['non-confidential', 'confidential'];

const insecure = true;

oasis.setGateway(
new oasis.gateways.Web3Gateway(
utils.wsProviderUrl(),
new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK)
new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK),
insecure
)
);

Expand Down
5 changes: 4 additions & 1 deletion test/7_test_failures.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ let mantleCounterBytecode = require('fs').readFileSync(
'/workdir/tests/e2e-tests/mantle/mantle-counter/target/service/mantle-counter.wasm'
);

const insecure = true;

oasis.setGateway(
new oasis.gateways.Web3Gateway(
utils.wsProviderUrl(),
new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK)
new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK),
insecure
)
);

Expand Down
8 changes: 6 additions & 2 deletions test/8_test_oasis_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,23 @@ if (truffleConfig.shouldRun(__filename)) {
label: 'mantle'
}
];

const insecure = true;

const gateways = [
{
gateway: new oasis.gateways.Web3Gateway(
utils.wsProviderUrl(),
new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK)
new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK),
insecure
),
completion: test => test.gateway.disconnect(),
options: { gasLimit: '0xe79732' },
label: 'web3-gw'
}, {
gateway: new oasis.gateways.Gateway(truffleConfig.DEVELOPER_GATEWAY_URL, {
headers: new Map([['X-OASIS-INSECURE-AUTH', 'VALUE']])
}),
}, insecure),
completion: _test => {},
options: undefined,
label: 'dev-gw'
Expand Down