mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +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"));
|
||||
}
|
||||
|
||||
sendToController.text = httpXOREpicBox(_address!);
|
||||
sendToController.text = formatAddress(_address!);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -923,9 +923,8 @@ class _SendViewState extends ConsumerState<SendView> {
|
|||
if (coin ==
|
||||
Coin.epicCash) {
|
||||
// strip http:// and https:// if content contains @
|
||||
content =
|
||||
httpXOREpicBox(
|
||||
content);
|
||||
content = formatAddress(
|
||||
content);
|
||||
}
|
||||
sendToController.text =
|
||||
content;
|
||||
|
@ -1778,8 +1777,8 @@ class _SendViewState extends ConsumerState<SendView> {
|
|||
}
|
||||
}
|
||||
|
||||
// strip http:// and https:// if epicAddress contains @
|
||||
String httpXOREpicBox(String epicAddress) {
|
||||
String formatAddress(String epicAddress) {
|
||||
// strip http:// or https:// prefixes if the address contains an @ symbol (and is thus an epicbox address)
|
||||
if ((epicAddress.startsWith("http://") ||
|
||||
epicAddress.startsWith("https://")) &&
|
||||
epicAddress.contains("@")) {
|
||||
|
|
|
@ -580,7 +580,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
|||
|
||||
if (coin == Coin.epicCash) {
|
||||
// strip http:// and https:// if content contains @
|
||||
content = httpXOREpicBox(content);
|
||||
content = formatAddress(content);
|
||||
}
|
||||
|
||||
sendToController.text = content;
|
||||
|
@ -758,7 +758,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
|||
_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 httpXOREpicBox(String epicAddress) {
|
||||
String formatAddress(String epicAddress) {
|
||||
// strip http:// or https:// prefixes if the address contains an @ symbol (and is thus an epicbox address)
|
||||
if ((epicAddress.startsWith("http://") ||
|
||||
epicAddress.startsWith("https://")) &&
|
||||
epicAddress.contains("@")) {
|
||||
|
|
Loading…
Reference in a new issue