Skip to content

[BWS/BWC] Feat: MoonPay embedded buy new endpoints#4170

Open
Gamboster wants to merge 2 commits into
bitpay:masterfrom
Gamboster:feat/moonpayEmbeddedBuySession
Open

[BWS/BWC] Feat: MoonPay embedded buy new endpoints#4170
Gamboster wants to merge 2 commits into
bitpay:masterfrom
Gamboster:feat/moonpayEmbeddedBuySession

Conversation

@Gamboster
Copy link
Copy Markdown
Contributor

Description
New endpoints are required to create/revoke a session in the Moonpay embedded flow.

Changelog
I added two necessary endpoints: createSession and revokeActiveSession.
Additionally, there's a minor refactor for getIpFromReq.
The respective unit tests have been added.

if (!ip && req.ip) ip = req.ip;
if (!ip && req.connection && req.connection.remoteAddress) ip = req.connection.remoteAddress;

ip = ip.trim();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if !ip is still true here?

Also, could you explain the need/use-case for this refactor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants