From 7fa603afa54941bcca207244564af5a453262ed0 Mon Sep 17 00:00:00 2001 From: Arman Yaraee Date: Tue, 8 Aug 2023 12:28:19 +0100 Subject: [PATCH] [PI-139]: Do not mutate the object config during l1 storage --- package.json | 2 +- src/api/storeStarkL1Registration.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a7b2590f..ebf29bee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rhino.fi/client-js", - "version": "5.2.0", + "version": "5.2.1", "main": "src/index.js", "files": [ "src", diff --git a/src/api/storeStarkL1Registration.js b/src/api/storeStarkL1Registration.js index 82a21887..afe2c117 100644 --- a/src/api/storeStarkL1Registration.js +++ b/src/api/storeStarkL1Registration.js @@ -7,7 +7,9 @@ module.exports = async (dvf, nonce, signature) => { const url = '/v1/trading/storeStarkL1Registration' - const { ethAddress } = await dvf.getUserConfig(nonce, signature) + // Explicitly fetch the config to get the user's registered address + // in the backend + const { ethAddress } = await dvf.getUserConfigFromServer(nonce, signature) const l1RegistrationSignature = await dvf.stark.signRegistration( ethAddress