Skip to content

Commit

Permalink
fixed range error in parsing domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
Asquare17 committed May 18, 2023
1 parent c26022a commit fb19f07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/src/utils/functions.dart
Expand Up @@ -51,8 +51,7 @@ class ThepeerFunctions {
static void log(String data) => debugPrint('ThepeerLog: $data');

/// converts the base url to only domain name e.g [https://chain.thepeer.co?] returns [chain.thepeer.co]
static String domainName =
baseUrl.replaceAll("https://", "").substring(0, baseUrl.length - 1);
static String domainName = Uri.parse(baseUrl).host;

/// Create peer url
static Uri createUrl({
Expand Down

0 comments on commit fb19f07

Please sign in to comment.