mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
rename address-formatting function
This commit is contained in:
parent
8bb41255ea
commit
e98ad2971a
2 changed files with 9 additions and 10 deletions
|
@ -591,7 +591,7 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
_address = _address!.substring(0, _address!.indexOf("\n"));
|
_address = _address!.substring(0, _address!.indexOf("\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
sendToController.text = httpXOREpicBox(_address!);
|
sendToController.text = formatAddress(_address!);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -923,8 +923,7 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
if (coin ==
|
if (coin ==
|
||||||
Coin.epicCash) {
|
Coin.epicCash) {
|
||||||
// strip http:// and https:// if content contains @
|
// strip http:// and https:// if content contains @
|
||||||
content =
|
content = formatAddress(
|
||||||
httpXOREpicBox(
|
|
||||||
content);
|
content);
|
||||||
}
|
}
|
||||||
sendToController.text =
|
sendToController.text =
|
||||||
|
@ -1778,8 +1777,8 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// strip http:// and https:// if epicAddress contains @
|
String formatAddress(String epicAddress) {
|
||||||
String httpXOREpicBox(String epicAddress) {
|
// strip http:// or https:// prefixes if the address contains an @ symbol (and is thus an epicbox address)
|
||||||
if ((epicAddress.startsWith("http://") ||
|
if ((epicAddress.startsWith("http://") ||
|
||||||
epicAddress.startsWith("https://")) &&
|
epicAddress.startsWith("https://")) &&
|
||||||
epicAddress.contains("@")) {
|
epicAddress.contains("@")) {
|
||||||
|
|
|
@ -580,7 +580,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
||||||
|
|
||||||
if (coin == Coin.epicCash) {
|
if (coin == Coin.epicCash) {
|
||||||
// strip http:// and https:// if content contains @
|
// strip http:// and https:// if content contains @
|
||||||
content = httpXOREpicBox(content);
|
content = formatAddress(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendToController.text = content;
|
sendToController.text = content;
|
||||||
|
@ -758,7 +758,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
||||||
_address = _address!.substring(0, _address!.indexOf("\n"));
|
_address = _address!.substring(0, _address!.indexOf("\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
sendToController.text = httpXOREpicBox(_address!);
|
sendToController.text = formatAddress(_address!);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1345,8 +1345,8 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// strip http:// and https:// if epicAddress contains @
|
String formatAddress(String epicAddress) {
|
||||||
String httpXOREpicBox(String epicAddress) {
|
// strip http:// or https:// prefixes if the address contains an @ symbol (and is thus an epicbox address)
|
||||||
if ((epicAddress.startsWith("http://") ||
|
if ((epicAddress.startsWith("http://") ||
|
||||||
epicAddress.startsWith("https://")) &&
|
epicAddress.startsWith("https://")) &&
|
||||||
epicAddress.contains("@")) {
|
epicAddress.contains("@")) {
|
||||||
|
|
Loading…
Reference in a new issue