Skip to content

Commit fb893a7

Browse files
fix(background): use correct intent in completeGrant for add funds (#537)
1 parent 0e8941b commit fb893a7

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/background/services/openPayments.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,12 @@ export class OpenPaymentsService {
341341
})
342342

343343
await this.initClient(walletAddress.id)
344-
await this.completeGrant(amount, walletAddress, recurring)
344+
await this.completeGrant(
345+
amount,
346+
walletAddress,
347+
recurring,
348+
InteractionIntent.CONNECT
349+
)
345350

346351
await this.storage.set({
347352
walletAddress,
@@ -359,7 +364,12 @@ export class OpenPaymentsService {
359364
'recurringGrant'
360365
])
361366

362-
await this.completeGrant(amount, walletAddress!, recurring)
367+
await this.completeGrant(
368+
amount,
369+
walletAddress!,
370+
recurring,
371+
InteractionIntent.FUNDS
372+
)
363373

364374
// cancel existing grants of same type, if any
365375
if (grants.oneTimeGrant && !recurring) {
@@ -375,7 +385,7 @@ export class OpenPaymentsService {
375385
amount: string,
376386
walletAddress: WalletAddress,
377387
recurring: boolean,
378-
intent: InteractionIntent = InteractionIntent.CONNECT
388+
intent: InteractionIntent
379389
): Promise<GrantDetails> {
380390
const transformedAmount = toAmount({
381391
value: amount,

0 commit comments

Comments
 (0)