Skip to content

Commit

Permalink
Fix currency list
Browse files Browse the repository at this point in the history
  • Loading branch information
romaroid committed Dec 22, 2017
1 parent 8cba197 commit 12a8906
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/js/modules/wallet/configs/wallet-state.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
});
}

function checkAPIKeyActive($state, $q, launchService, modalService, sdkService) {
function checkAPIKeyActive($state, $q, launchService, modalService, sdkService, Currencies) {
return launchService.getWalletConfig(true)
.then(function(result) {
if (result.api_key && (result.api_key !== 'ok')) {
Expand All @@ -298,6 +298,13 @@

// throw error to prevent controller from loading or any other resolves to continue
return $q.reject(new Error("API_KEY_INVALID"));
} else {
// TODO Review checkAPIKeyActive
if(result.currencies) {
result.currencies.forEach(function (currency) {
Currencies.enableCurrency(currency);
});
}
}

return true;
Expand Down

0 comments on commit 12a8906

Please sign in to comment.