Skip to content

Commit

Permalink
pool: add initiator string to RPC calls
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Jan 27, 2021
1 parent 3f2051b commit e6b8d24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/api/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const MIN_FEE_RATE_KW = 253;
// see: https://github.com/lightninglabs/pool/blob/master/order/interface.go#L35
export const ORDER_VERSION = 2;

const POOL_INITIATOR = 'lit-ui';

/** the names and argument types for the subscription events */
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface PoolEvents {}
Expand Down Expand Up @@ -63,6 +65,7 @@ class PoolApi extends BaseApi<PoolEvents> {
req.setAccountValue(amount);
req.setRelativeHeight(expiryBlocks);
req.setConfTarget(confTarget);
req.setInitiator(POOL_INITIATOR);
const res = await this._grpc.request(Trader.InitAccount, req, this._meta);
return res.toObject();
}
Expand Down Expand Up @@ -176,6 +179,7 @@ class PoolApi extends BaseApi<PoolEvents> {
}

const req = new POOL.SubmitOrderRequest();
req.setInitiator(POOL_INITIATOR);

const order = new POOL.Order();
order.setTraderKey(b64(traderKey));
Expand Down

0 comments on commit e6b8d24

Please sign in to comment.