@devvit/payments 0.12.0-next-2025-03-31-81fa43e0f.0 → 0.12.0-next-2025-04-10-a27f59c35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/plugin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PaymentsServiceDefinition } from '@devvit/protos/payments.js';
2
- import { Devvit } from '@devvit/public-api';
2
+ import { Devvit, getCurrentUsername } from '@devvit/public-api';
3
3
  /** @internal */
4
4
  export const paymentsPlugin = Devvit.use(PaymentsServiceDefinition);
5
5
  Devvit.addMenuItem({
@@ -7,7 +7,7 @@ Devvit.addMenuItem({
7
7
  label: 'Get Payments Help',
8
8
  onPress: async (_, context) => {
9
9
  const url = new URL('https://support.reddithelp.com/hc/en-us/requests/new?ticket_form_id=29770197409428&tf_29764567374740=devvit_product_not_working');
10
- const username = await context.reddit.getCurrentUsername();
10
+ const username = await getCurrentUsername();
11
11
  // prefill reddit username
12
12
  if (username) {
13
13
  url.searchParams.append(`tf_360026362751`, username);