private function renderWidgetObj(Widget $widget) { $vars = array(); $vars['previewOnly'] = false; $vars['display'] = at($_GET, 'display', 'overview'); $vars['widgetID'] = $widget->id; $vars['width'] = $widget->width; $vars['height'] = $widget->height; $vars['color'] = $widget->color; $vars['title'] = $widget->title; $vars['about'] = $widget->about; $vars['currency'] = $widget->currency; $vars['goal'] = $widget->goalAmnt; $vars['raised'] = $widget->raisedAmnt; $vars['lastBalance'] = $widget->raisedSatoshis; $vars['progressPercent'] = $widget->progressPercent; $this->setAltCurrencyValues($widget->goalAmnt, $widget->raisedAmnt, $vars); $vars['bitcoinAddress'] = $widget->bitcoinAddress; $vars['checkProgressURI'] = Routes\checkWidgetProgress($widget); $vars['checkBalanceURI'] = BlockchainDotInfo\balanceLookupURL($widget->bitcoinAddress); $vars['amountRaisedURI'] = Routes\amountRaised($widget); return $this->renderWidgetArr($vars); }
function testActionForCheckingAddressBalanceViaJavascript() { $w = getWidget(); $this->get(Routes\amountRaised($w)); $this->get(Routes\amountRaised($w) . '?currency=BTC'); $this->get(Routes\amountRaised($w) . '?currency=USD'); $this->get(Routes\amountRaised($w) . '?currency=CNY'); }