status-react/resources/wallet.js

32 lines
756 B
JavaScript
Raw Normal View History

status.command({
name: "browse",
2016-11-22 12:50:52 +00:00
title: I18n.t('browse_title'),
description: I18n.t('browse_description'),
color: "#ffa500",
fullscreen: true,
onSend: function (params, context) {
var url = 'https://status.im/dapps/wallet';
if (context.debug) {
url = 'http://127.0.0.1:3450';
}
return {
title: "Wallet",
dynamicTitle: false,
markup: status.components.bridgedWebView(url)
};
}
});
status.autorun("browse");
2016-10-20 13:51:37 +00:00
status.registerFunction("send", function (params, context) {
var data = {
from: context.from,
to: params.address,
value: web3.toWei(params.amount, "ether")
};
web3.eth.sendTransaction(data);
})