diff --git a/app/js/services/jslib.coffee b/app/js/services/jslib.coffee index 3df88990..879ae3b5 100644 --- a/app/js/services/jslib.coffee +++ b/app/js/services/jslib.coffee @@ -4,7 +4,7 @@ ### class BitsharesJsRpc - constructor: (@RpcService, @Shared, $timeout, $translate, $q) -> + constructor: (@RpcService, @Shared, @Growl, $timeout, $translate, $q) -> return unless bts = window.bts WalletService = Wallet @@ -41,10 +41,16 @@ class BitsharesJsRpc window.wallet_api = js_client.wallet_api js_client.event 'error', (text, stack)=> - console.log '... error text, stack',text, stack @Shared.addError text, stack return + js_client.event 'transaction_broadcasted', ()=> + $translate("jslib_wallet.transaction_broadcasted").then (message)=> + @Growl.notice "", message + , (error)=> + @Growl.notice "", error + return + js_client.event 'wallet.not_found', ()-> #console.log '... window.location.hash', window.location.hash unless window.location.hash.match /login$/ @@ -63,7 +69,7 @@ class BitsharesJsRpc location.href = base_path angular.module("app").service "BitsharesJsRpc", - ["RpcService", "Shared", "$timeout", "$translate", "$q", BitsharesJsRpc] + ["RpcService", "Shared", "Growl", "$timeout", "$translate", "$q", BitsharesJsRpc] angular.module("app").run (BitsharesJsRpc, RpcService)-> #console.log "[BitShares-JS] included" \ No newline at end of file diff --git a/app/static/locale-en.json b/app/static/locale-en.json index 064d6979..2d8a256b 100644 --- a/app/static/locale-en.json +++ b/app/static/locale-en.json @@ -163,6 +163,7 @@ "create_wallet": "Create Wallet" }, "jslib_wallet":{ + "transaction_broadcasted": "Transaction broadcasted", "insufficient_balances": "Insufficient balances", "conflicting_account":"Account '{{v1}}' is not owned by this wallet.", "account_not_found": "Account '{{v1}}' was not found", diff --git a/app/static/locale-zh-CN.json b/app/static/locale-zh-CN.json index 46709af1..c386ad82 100644 --- a/app/static/locale-zh-CN.json +++ b/app/static/locale-zh-CN.json @@ -161,6 +161,7 @@ "create_wallet": "创建钱包" }, "jslib_wallet":{ + "transaction_broadcasted": "交易已经广播", "insufficient_balances": "余额不足", "conflicting_account":"账号 '{{v1}}' 不是这个钱包所拥有的。", "account_not_found": "账号 '{{v1}}' 并没有找到。",