update paynym url

This commit is contained in:
julian 2024-11-14 13:32:12 -06:00 committed by julian-CStack
parent 6ff539e71b
commit e95d5a10b6
4 changed files with 13 additions and 10 deletions

View file

@ -13,10 +13,8 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../../models/paynym/paynym_account.dart';
import 'dialogs/claiming_paynym_dialog.dart';
import 'paynym_home_view.dart';
import '../wallet_view/wallet_view.dart';
import '../../providers/global/paynym_api_provider.dart';
import '../../providers/global/wallets_provider.dart';
import '../../providers/wallet/my_paynym_account_state_provider.dart';
@ -30,6 +28,9 @@ import '../../widgets/custom_buttons/app_bar_icon_button.dart';
import '../../widgets/desktop/desktop_app_bar.dart';
import '../../widgets/desktop/desktop_scaffold.dart';
import '../../widgets/desktop/primary_button.dart';
import '../wallet_view/wallet_view.dart';
import 'dialogs/claiming_paynym_dialog.dart';
import 'paynym_home_view.dart';
class PaynymClaimView extends ConsumerStatefulWidget {
const PaynymClaimView({
@ -197,7 +198,7 @@ class _PaynymClaimViewState extends ConsumerState<PaynymClaimView> {
if (shouldCancel) return;
// attempt to create new entry in paynym.is db
// attempt to create new entry in [PaynymIsApi.baseURL] db
final created = await ref
.read(paynymAPIProvider)
.create(pCode.toString());

View file

@ -11,8 +11,10 @@
import 'dart:typed_data';
import 'package:flutter/material.dart';
import '../../../networking/http.dart';
import '../../../services/tor_service.dart';
import '../../../utilities/paynym_is_api.dart';
import '../../../utilities/prefs.dart';
class PayNymBot extends StatelessWidget {
@ -50,7 +52,8 @@ class PayNymBot extends StatelessWidget {
Future<Uint8List> _fetchImage() async {
final HTTP client = HTTP();
final Uri uri = Uri.parse("https://paynym.is/$paymentCodeString/avatar");
final Uri uri =
Uri.parse("${PaynymIsApi.baseURL}/$paymentCodeString/avatar");
final response = await client.get(
url: uri,

View file

@ -25,7 +25,7 @@ import 'prefs.dart';
// todo: better error message parsing (from response itself?)
class PaynymIsApi {
static const String baseURL = "https://paynym.is/api";
static const String baseURL = "https://paynym.rs";
static const String version = "/v1";
HTTP client = HTTP();
@ -35,9 +35,8 @@ class PaynymIsApi {
Map<String, dynamic> body, [
Map<String, String> additionalHeaders = const {},
]) async {
final String url = baseURL +
version +
(endpoint.startsWith("/") ? endpoint : "/$endpoint");
final String url =
"$baseURL/api$version${endpoint.startsWith("/") ? endpoint : "/$endpoint"}";
final uri = Uri.parse(url);
// Calculate the body length.

View file

@ -1622,7 +1622,7 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
);
} catch (e, s) {
Logging.instance.log(
"Failed to check paynym.is followers/following for history during "
"Failed to check ${PaynymIsApi.baseURL} followers/following for history during "
"bitcoin wallet ($walletId ${info.name}) "
"_recoverWalletFromBIP32SeedPhrase: $e/n$s",
level: LogLevel.Error,