mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
* Force SSL for Electrum and Monero nodes Some Cleanup * minor [skip ci] * potential fix for transactions not cleared correctly [skip ci] * minor fix [skip ci]
21 lines
428 B
Dart
21 lines
428 B
Dart
import 'dart:convert';
|
|
import 'dart:math';
|
|
|
|
import 'package:convert/convert.dart';
|
|
|
|
extension StringParsing on String {
|
|
String get utf8Message {
|
|
if (startsWith('0x')) {
|
|
final List<int> decoded = hex.decode(
|
|
substring(2),
|
|
);
|
|
return utf8.decode(decoded);
|
|
}
|
|
|
|
return this;
|
|
}
|
|
|
|
String safeSubString(int start, int end) {
|
|
return this.substring(0, min(this.toString().length, 12));
|
|
}
|
|
}
|