Created
November 7, 2018 08:10
-
-
Save iamajvillalobos/94927f5b777988867c38600263bc03e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function fetchAddressBalances() { | |
if (isFederatedAddress(address)) { | |
let xlmAddress = await fetchXLMAddressFromFederation(address); | |
if (xlmAddress.length > 0) { | |
let result = await fetchXLMAddressBalances(xlmAddress); | |
if (Array.isArray(result)) { | |
onButtonClick(result); | |
} else { | |
onError(result); | |
} | |
} else { | |
onError("Not Found"); | |
} | |
} else { | |
let result = await fetchXLMAddressBalances(address); | |
if (Array.isArray(result)) { | |
onButtonClick(result); | |
} else { | |
onError(result); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment