Skip to content

Commit 62abeab

Browse files
alexvansandefrozeman
authored andcommitted
remove amount param from coinbase widget (ethereum#347)
1 parent 283e52d commit 62abeab

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

app/client/lib/thirdparty/coinbase-widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CoinBaseWidget = function(buttonElem, params) {
1313
};
1414

1515
self.generateParams = function() {
16-
return "?address=" + encodeURIComponent(params.address) + ("&amount=" + encodeURIComponent(params.amount)) + ("&code=" + encodeURIComponent(params.code)) + ("&currency=" + encodeURIComponent(params.currency)) + ("&crypto_currency=" + encodeURIComponent(params.crypto_currency)) + ("&state=" + encodeURIComponent(params.state));
16+
return "?address=" + encodeURIComponent(params.address) + ("&code=" + encodeURIComponent(params.code)) + ("&currency=" + encodeURIComponent(params.currency)) + ("&crypto_currency=" + encodeURIComponent(params.crypto_currency)) + ("&state=" + encodeURIComponent(params.state));
1717
};
1818

1919
self.modalIframeStyle = function() {

app/client/templates/elements/executeContract.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Template['elements_executeContract_constant'].onCreated(function(){
143143
// get args for the constant function and add callback
144144
var args = TemplateVar.get('inputs').concat(function(e, r) {
145145
if(!e) {
146+
console.log('r', r);
146147
var outputs = [];
147148
// single return value
148149
if(template.data.outputs.length === 1) {
@@ -161,6 +162,7 @@ Template['elements_executeContract_constant'].onCreated(function(){
161162
}
162163
});
163164

165+
console.log('contractInstance[\''+template.data.name+'\'].apply(null, ' + JSON.stringify(args) + ')');
164166
template.data.contractInstance[template.data.name].apply(null, args);
165167

166168
});
@@ -204,6 +206,10 @@ Template['elements_executeContract_constant'].events({
204206
*/
205207
'change .abi-input, input .abi-input': function(e, template) {
206208
var inputs = Helpers.addInputValue(template.data.inputs, this, e.currentTarget);
209+
_.each(inputs, function(e,i){
210+
console.log('input:', e,i, typeof i);
211+
})
212+
console.log('inputs', inputs);
207213
TemplateVar.set('inputs', inputs);
208214
}
209215
});

app/client/templates/views/account.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ Template['views_account'].events({
329329

330330
(new CoinBaseWidget(e.currentTarget, {
331331
address: this.address,
332-
amount: "5",
333332
code: "eb44c52c-9c3f-5fb6-8b11-fc3ec3022519",
334333
currency: "USD",
335334
crypto_currency: "ETH",

0 commit comments

Comments
 (0)