From e3ff72a76d2090f0c27dde8814b8419ff231ba70 Mon Sep 17 00:00:00 2001 From: davidpla Date: Tue, 4 Apr 2023 16:27:39 +0200 Subject: [PATCH 1/2] add userIp --- nodejs/putforsale_buynow.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nodejs/putforsale_buynow.js b/nodejs/putforsale_buynow.js index 58bd4fd..f75ca0e 100644 --- a/nodejs/putforsale_buynow.js +++ b/nodejs/putforsale_buynow.js @@ -10,6 +10,7 @@ INPUTS: * price: always an integer, in units the lowest possible unit of that cryptocurrency * rnd: a random number, to be generated in front end for each different query * timeValidUntil: when will the buynow end (Thursday, 23 September 2021 11:16:50) +* userIp: seller IP to check legal issues, optional field mandatory for fiat buynows */ const pvk = '0xd2827f4c3778758eb51719a698464aaffd10a5c7cf816c1de83c5e446bfc8e8d'; @@ -18,6 +19,7 @@ const price = 345; const rnd = 12342234; const timeValidUntil = '1632395810'; const assetId = '36771977682424071759165601888702044610709221343463'; +const userIp = '1.2.3.4'; // Preparing the query @@ -57,7 +59,7 @@ const signatureWithout0x = signature.substring(2, signature.length); // inject results into final mutation to send to graphQL endpoint const putForSaleMutation = ` mutation { - createBuyNowFromPutForSale( + createBuyNow( input: { assetId: "${assetId}", currencyId: ${currencyId}, @@ -65,6 +67,7 @@ mutation { rnd: ${rnd}, validUntil: "${validUntil}", signature: "${signatureWithout0x}", + userIp: "${userIp}", } ) }`; From d8c33d471df4d0651ee49e94e086e7122d23ba08 Mon Sep 17 00:00:00 2001 From: davidpla Date: Tue, 4 Apr 2023 16:42:05 +0200 Subject: [PATCH 2/2] improve userIp parameter description --- nodejs/putforsale_buynow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs/putforsale_buynow.js b/nodejs/putforsale_buynow.js index f75ca0e..8d3a626 100644 --- a/nodejs/putforsale_buynow.js +++ b/nodejs/putforsale_buynow.js @@ -10,7 +10,7 @@ INPUTS: * price: always an integer, in units the lowest possible unit of that cryptocurrency * rnd: a random number, to be generated in front end for each different query * timeValidUntil: when will the buynow end (Thursday, 23 September 2021 11:16:50) -* userIp: seller IP to check legal issues, optional field mandatory for fiat buynows +* userIp: seller IP, mandatory for fiat buynows, needed to comply with payment providers T&C */ const pvk = '0xd2827f4c3778758eb51719a698464aaffd10a5c7cf816c1de83c5e446bfc8e8d';