-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update deps * add AbstractProvider and AbstractSigner support in constructor * update changelog * fix possible race condition in subgraph indexation * Bump kubo-rpc-client v3 to v4 (#152) * Add `kubo-rpc-client` bump to changelog * 1.0.4 * Fix changelog? --------- Co-authored-by: Pierre Jeanjacquot <[email protected]>
- Loading branch information
1 parent
115b720
commit 76ea770
Showing
8 changed files
with
872 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import { | |
getTestConfig, | ||
getTestWeb3SignerProvider, | ||
getTestIExecOption, | ||
waitSubgraphIndexing, | ||
} from '../test-utils.js'; | ||
import IExec from 'iexec/IExec'; | ||
|
||
|
@@ -31,6 +32,7 @@ describe('web3mail.fetchMyContacts()', () => { | |
data: { email: '[email protected]' }, | ||
name: 'test do not use', | ||
}); | ||
await waitSubgraphIndexing(); | ||
}, 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME); | ||
|
||
it( | ||
|
@@ -119,6 +121,7 @@ describe('web3mail.fetchMyContacts()', () => { | |
data: { notemail: 'not email' }, | ||
name: 'test do not use', | ||
}); | ||
await waitSubgraphIndexing(); | ||
|
||
await dataProtector.grantAccess({ | ||
authorizedApp: WEB3_MAIL_DAPP_ADDRESS, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ import { | |
MAX_EXPECTED_BLOCKTIME, | ||
MAX_EXPECTED_WEB2_SERVICES_TIME, | ||
getTestConfig, | ||
waitSubgraphIndexing, | ||
} from '../test-utils.js'; | ||
|
||
describe('web3mail.fetchMyContacts()', () => { | ||
|
@@ -33,6 +34,7 @@ describe('web3mail.fetchMyContacts()', () => { | |
data: { email: '[email protected]' }, | ||
name: 'test do not use', | ||
}); | ||
await waitSubgraphIndexing(); | ||
}, 4 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME); | ||
|
||
it( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ import { | |
getTestConfig, | ||
getTestIExecOption, | ||
getTestWeb3SignerProvider, | ||
sleep, | ||
waitSubgraphIndexing, | ||
} from '../test-utils.js'; | ||
import { IExec } from 'iexec'; | ||
|
||
|
@@ -83,10 +83,8 @@ describe('web3mail.sendEmail()', () => { | |
data: { foo: 'bar' }, | ||
name: 'test do not use', | ||
}); | ||
|
||
await waitSubgraphIndexing(); | ||
web3mail = new IExecWeb3mail(...getTestConfig(consumerWallet.privateKey)); | ||
// avoid race condition with subgraph indexation | ||
await sleep(5_000); | ||
}, 4 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME + 5_000); | ||
|
||
it( | ||
|
@@ -112,6 +110,8 @@ describe('web3mail.sendEmail()', () => { | |
data: { email: '[email protected]' }, | ||
name: 'test do not use', | ||
}); | ||
await waitSubgraphIndexing(); | ||
|
||
//grant access to whitelist | ||
await dataProtector.grantAccess({ | ||
authorizedApp: WHITELIST_SMART_CONTRACT_ADDRESS, //whitelist address | ||
|
@@ -176,13 +176,14 @@ describe('web3mail.sendEmail()', () => { | |
data: { email: '[email protected]' }, | ||
name: 'test do not use', | ||
}); | ||
await waitSubgraphIndexing(); | ||
|
||
const params = { | ||
emailSubject: 'e2e mail object for test', | ||
emailContent: 'e2e mail content for test', | ||
protectedData: protectedData.address, | ||
workerpoolAddressOrEns: workerpoolAddress, | ||
}; | ||
await sleep(5_000); | ||
await expect(web3mail.sendEmail(params)).rejects.toThrow( | ||
new WorkflowError({ | ||
message: 'Failed to sendEmail', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters