Skip to content

Commit f1c9fa6

Browse files
Release/sdk 1.1.1 (#171)
* use voucher-subgraph-deployer semver * Update builder dashboard URLs in error messages (#170) * Update changelog * 1.1.1 * Only fetch user specific workerpool orders if useVoucher * Fix unit test with isRequesterStrict * Update changelog --------- Co-authored-by: Pierre Jeanjacquot <[email protected]>
1 parent d428322 commit f1c9fa6

File tree

10 files changed

+22
-11
lines changed

10 files changed

+22
-11
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ steps:
302302

303303
- name: voucher-subgraph-deployer
304304
# https://github.com/iExecBlockchainComputing/iexec-voucher-subgraph
305-
image: iexechub/voucher-subgraph-deployer:c0640e8d
305+
image: iexechub/voucher-subgraph-deployer:1.0.0
306306
pull: always
307307
environment:
308308
RPC_URL: http://bellecour-fork:8545

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.1]
6+
7+
## Changed
8+
9+
- Update builder dashboard URL in some error messages related to `sendEmail()` method
10+
- Use user specific workerpool orders if `useVoucher` is set to `true`
11+
512
## [1.1.0]
613

714
## Added

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iexec/web3mail",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "This product enables users to confidentially store data–such as mail address, documents, personal information ...",
55
"main": "./dist/index.js",
66
"type": "module",

src/web3mail/sendEmail.models.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ export function checkUserVoucher({
2727
}) {
2828
if (bnToNumber(userVoucher.expirationTimestamp) < Date.now() / 1000) {
2929
throw new Error(
30-
'Oops, it seems your voucher has expired. You might want to ask for a top up. Check on https://builder-dashboard.iex.ec/'
30+
'Oops, it seems your voucher has expired. You might want to ask for a top up. Check on https://builder.iex.ec/'
3131
);
3232
}
3333

3434
if (bnToNumber(userVoucher.balance) === 0) {
3535
throw new Error(
36-
'Oops, it seems your voucher is empty. You might want to ask for a top up. Check on https://builder-dashboard.iex.ec/'
36+
'Oops, it seems your voucher is empty. You might want to ask for a top up. Check on https://builder.iex.ec/'
3737
);
3838
}
3939
}

src/web3mail/sendEmail.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const sendEmail = async ({
130130
} catch (err) {
131131
if (err?.message?.startsWith('No Voucher found for address')) {
132132
throw new Error(
133-
'Oops, it seems your wallet is not associated with any voucher. Check on https://builder-dashboard.iex.ec/'
133+
'Oops, it seems your wallet is not associated with any voucher. Check on https://builder.iex.ec/'
134134
);
135135
}
136136
throw err;
@@ -193,6 +193,7 @@ export const sendEmail = async ({
193193
app: vDappAddressOrENS,
194194
dataset: vDatasetAddress,
195195
requester: requesterAddress, // public orders + user specific orders
196+
isRequesterStrict: useVoucher, // If voucher, we only want user specific orders
196197
minTag: ['tee', 'scone'],
197198
maxTag: ['tee', 'scone'],
198199
category: 0,
@@ -203,6 +204,7 @@ export const sendEmail = async ({
203204
app: vDappWhitelistAddress,
204205
dataset: vDatasetAddress,
205206
requester: requesterAddress, // public orders + user specific orders
207+
isRequesterStrict: useVoucher, // If voucher, we only want user specific orders
206208
minTag: ['tee', 'scone'],
207209
maxTag: ['tee', 'scone'],
208210
category: 0,

tests/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ services:
220220
voucher-subgraph-deployer:
221221
restart: 'no'
222222
# https://github.com/iExecBlockchainComputing/iexec-voucher-subgraph
223-
image: iexechub/voucher-subgraph-deployer:c0640e8d
223+
image: iexechub/voucher-subgraph-deployer:1.0.0
224224
environment:
225225
RPC_URL: http://bellecour-fork:8545
226226
GRAPHNODE_URL: http://graphnode:8020

tests/e2e/sendEmail.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ describe('web3mail.sendEmail()', () => {
388388
}
389389
expect(error).toBeDefined();
390390
expect(error.message).toBe(
391-
'Oops, it seems your wallet is not associated with any voucher. Check on https://builder-dashboard.iex.ec/'
391+
'Oops, it seems your wallet is not associated with any voucher. Check on https://builder.iex.ec/'
392392
);
393393
},
394394
2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME

tests/unit/sendEmail.models.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('sendEmail.models', () => {
3636
})
3737
).toThrow(
3838
new Error(
39-
'Oops, it seems your voucher has expired. You might want to ask for a top up. Check on https://builder-dashboard.iex.ec/'
39+
'Oops, it seems your voucher has expired. You might want to ask for a top up. Check on https://builder.iex.ec/'
4040
)
4141
);
4242
});
@@ -56,7 +56,7 @@ describe('sendEmail.models', () => {
5656
})
5757
).toThrow(
5858
new Error(
59-
'Oops, it seems your voucher is empty. You might want to ask for a top up. Check on https://builder-dashboard.iex.ec/'
59+
'Oops, it seems your voucher is empty. You might want to ask for a top up. Check on https://builder.iex.ec/'
6060
)
6161
);
6262
});

tests/unit/sendEmail.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ describe('sendEmail', () => {
196196
app: WEB3_MAIL_DAPP_ADDRESS,
197197
dataset: protectedData,
198198
requester: userAddress,
199+
isRequesterStrict: false,
199200
minTag: ['tee', 'scone'],
200201
maxTag: ['tee', 'scone'],
201202
category: 0,
@@ -208,6 +209,7 @@ describe('sendEmail', () => {
208209
app: WHITELIST_SMART_CONTRACT_ADDRESS.toLowerCase(),
209210
dataset: protectedData,
210211
requester: userAddress,
212+
isRequesterStrict: false,
211213
minTag: ['tee', 'scone'],
212214
maxTag: ['tee', 'scone'],
213215
category: 0,

0 commit comments

Comments
 (0)