Skip to content

Commit

Permalink
add referralId to boltz /createswap (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
bordalix authored Dec 21, 2023
1 parent f45f3af commit 0e7ba79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pkg/boltz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ interface CreateSwapCommonRequest {
type: 'submarine' | 'reversesubmarine';
pairId: 'L-BTC/BTC';
orderSide: 'buy' | 'sell';
referralId?: 'marina';
}

interface CreateSwapCommonResponse {
Expand Down Expand Up @@ -492,7 +493,8 @@ export class Boltz implements BoltzInterface {
private callCreateSwap = async (
params: CreateSwapCommonRequest
): Promise<CreateSwapCommonResponse & any> => {
return this.postApi(`${this.url}/createswap`, params);
const paramsWithReferralId: CreateSwapCommonRequest = { ...params, referralId: 'marina' };
return this.postApi(`${this.url}/createswap`, paramsWithReferralId);
};

private getApi = async (url: string): Promise<any> => {
Expand Down

0 comments on commit 0e7ba79

Please sign in to comment.