testnet icon indicating copy to clipboard operation
testnet copied to clipboard

[Cards] Wallet Backend - Fix change pin endpoint

Open sanducb opened this issue 5 months ago • 0 comments

Context

Currently, the assumption on the wallet backend side is that it will receive a cypher containing the encrypted (with a public key owned by the frontend) new pin when changePin endpoint is called from wallet frontend. That cypher would then be sent from wallet backend to GateHub in order to update the pin. After checking with GateHub, we found out that upon calling their backend we will actually receive a public key (on the JWT payload) which then must be passed back to the frontend and will be used to encrypt the new pin. The newly created cypher will be sent to wallet backend to continue the flow.

Todos

  • [ ] Adapt the changePin endpoint to the new requirement i.e. use GateHub's public key to encrypt the new pin
  • [ ] Adapt controller tests accordingly

sanducb avatar Oct 02 '24 10:10 sanducb