Skip to content

Commit b38f083

Browse files
committed
verify lnurl amt rounding min/max edges
1 parent 8ad57d7 commit b38f083

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

test/specs/lnurl.e2e.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,32 +151,31 @@ describe('@lnurl - LNURL', () => {
151151
await expectTextWithin('ActivitySpending', '20 001');
152152

153153
// lnurl-pay (min != max) with comment
154-
const msats = 100000; // msats
155-
const sats = (msats / 1000).toString();
156154
const payRequest1 = await lnurlServer.generateNewUrl('payRequest', {
157-
minSendable: msats, // msats
158-
maxSendable: 200000, // msats
155+
minSendable: 149500, // msats
156+
maxSendable: 200999, // msats
159157
metadata: '[["text/plain","lnurl-node1"]]',
160158
commentAllowed: 12,
161159
});
162160
console.log('payRequest1', payRequest1);
163161

164162
await enterAddressViaScanPrompt(payRequest1.encoded, { acceptCameraPermission: false });
165163
await expectTextWithin('SendNumberField', '0');
166-
// Check amounts 99 - 201 not allowed
164+
// Check amounts 149 - 201 not allowed
167165
await tap('N2');
168166
await tap('N0');
169167
await tap('N1');
170168
await expectTextWithin('SendNumberField', '201');
171169
await elementById('ContinueAmount').waitForEnabled({ reverse: true });
172170
await multiTap('NRemove', 3); // remove "201"
173-
await multiTap('N9', 2);
174-
175-
await expectTextWithin('SendNumberField', '99');
171+
await tap('N1');
172+
await tap('N4');
173+
await tap('N9');
174+
await expectTextWithin('SendNumberField', '149');
176175
await tap('ContinueAmount');
177176
await waitForToast('LnurlPayAmountTooLowToast');
178177

179-
await multiTap('NRemove', 2); // remove "99"
178+
await multiTap('NRemove', 3); // remove "149"
180179
// go with 150
181180
await tap('N1');
182181
await tap('N5');

0 commit comments

Comments
 (0)