Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Commit

Permalink
Added transaction broadcasted notice
Browse files Browse the repository at this point in the history
  • Loading branch information
James Calfee committed Jun 4, 2015
1 parent 5fef469 commit dde58a0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/js/services/jslib.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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$/
Expand All @@ -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"
1 change: 1 addition & 0 deletions app/static/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions app/static/locale-zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"create_wallet": "创建钱包"
},
"jslib_wallet":{
"transaction_broadcasted": "交易已经广播",
"insufficient_balances": "余额不足",
"conflicting_account":"账号 '{{v1}}' 不是这个钱包所拥有的。",
"account_not_found": "账号 '{{v1}}' 并没有找到。",
Expand Down

0 comments on commit dde58a0

Please sign in to comment.