Skip to content

Fixes #34 memo bug#35

Open
BlakeKaufman wants to merge 6 commits into
LightRider5:mainfrom
BlakeKaufman:issue-34-API-getTunnelConfigBug
Open

Fixes #34 memo bug#35
BlakeKaufman wants to merge 6 commits into
LightRider5:mainfrom
BlakeKaufman:issue-34-API-getTunnelConfigBug

Conversation

@BlakeKaufman

Copy link
Copy Markdown

No description provided.

@BlakeKaufman

Copy link
Copy Markdown
Author

In my change, I added this code to the getTunnelConfig route so that people using the API can get the referral revenue. I am pretty sure I have to set the order variable as let order = new Order(), but this is how you had it, so I left it. You might want to check it, though.

if (!!partnerCode) {
        order = new Order();
        order.partnerCode = partnerCode;
        order.amount = data.amount; // get satoshi value from payment response
        order.save((err, doc) => {
          if (err) {
            console.error("Error saving order:", err);
            socket.emit(
              "addAddressCodeError",
              "An error occurred while saving the referral code."
            );
            return;
          }
          console.log("Saved Order successfully!");
        });
      }

@BlakeKaufman BlakeKaufman changed the title Fixes #123 memo bug Fixes #34 memo bug Jan 2, 2025
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.

1 participant