Skip to content

Commit 8ab97db

Browse files
committed
api/loop: add swap initiator string
1 parent c1fbf41 commit 8ab97db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/api/loop.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import Big from 'big.js';
55
import BaseApi from './base';
66
import GrpcClient from './grpc';
77

8+
const LOOP_INITIATOR = 'lit-ui';
9+
810
/** the names and argument types for the subscription events */
911
interface LoopEvents {
1012
monitor: LOOP.SwapStatus.AsObject;
@@ -89,6 +91,7 @@ class LoopApi extends BaseApi<LoopEvents> {
8991
req.setAmt(+amount);
9092
req.setMaxSwapFee(+quote.swapFee);
9193
req.setMaxMinerFee(+quote.minerFee);
94+
req.setInitiator(LOOP_INITIATOR);
9295
if (lastHop) req.setLastHop(Buffer.from(lastHop, 'hex').toString('base64'));
9396
if (confTarget) req.setHtlcConfTarget(confTarget);
9497
const res = await this._grpc.request(SwapClient.LoopIn, req, this._meta);
@@ -115,6 +118,7 @@ class LoopApi extends BaseApi<LoopEvents> {
115118
req.setMaxPrepayRoutingFee(this._calcRoutingFee(+quote.prepayAmount));
116119
req.setOutgoingChanSetList(chanIds);
117120
req.setSwapPublicationDeadline(deadline);
121+
req.setInitiator(LOOP_INITIATOR);
118122
if (confTarget) req.setSweepConfTarget(confTarget);
119123
if (destAddress) req.setDest(destAddress);
120124

0 commit comments

Comments
 (0)