Skip to content

Instantly share code, notes, and snippets.

@iamajvillalobos
Created November 7, 2018 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamajvillalobos/94927f5b777988867c38600263bc03e7 to your computer and use it in GitHub Desktop.
Save iamajvillalobos/94927f5b777988867c38600263bc03e7 to your computer and use it in GitHub Desktop.
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