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

Commit

Permalink
Merge pull request #234 from blockchain/revert-233-account-rename
Browse files Browse the repository at this point in the history
Revert "Different account wording, don't confirm creation"
  • Loading branch information
Sjors committed Dec 21, 2015
2 parents 8e12ec4 + 5c978a4 commit b075741
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 35 deletions.
2 changes: 1 addition & 1 deletion app/partials/home.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
activity-feed
.col-md-6.col-sm-12.col-xs-12.col-home.flex-column
.section
h5.mtn.type-h5.em-400.mbl(translate="BALANCES")
h5.mtn.type-h5.em-400.mbl Account Balances
ul.pln.account-balances
li.flex-between.border-bottom-light(ng-repeat="account in activeAccounts")
span.em-500 {{::account.label}}
Expand Down
5 changes: 2 additions & 3 deletions app/partials/send.jade
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@
ui-select-choices(repeat="origin in origins | filter: getFilter($select.search)" group-by="'type'" ui-disable-choice="hasZeroBalance(origin)")
span(ng-class="{aaa: hasZeroBalance(origin)}")
label-origin(origin='origin' highlight="$select.search")
span.help-block(ng-show="sendForm.from.$invalid && sendForm.destinations0.$touched", translate="MUST_SELECT_ORIGIN")
span.help-block(ng-show="sendForm.from.$invalid && sendForm.destinations0.$touched") Must select an account to send from
//- Advanced Send
.form-group.bc-modal-fade.mvl.advanced-recipient.row
//- To
label.pts.col-sm-2.col-xs-12
span(translate="TO")
|:
span(translate="TO:")
.col-sm-10.col-xs-12
.flex-column(ng-class="{'advanced-recipient-row': advanced}" ng-repeat="item in transaction.destinations track by $index")
p.form-control-static(ng-hide="originsLoaded")
Expand Down
2 changes: 1 addition & 1 deletion app/partials/settings/import-address.jade
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
p.form-control-static {{ address.address }}
.form-group
label.col-sm-3.control-label
span(translate="TO")
span(translate="TO_ACCOUNT")
|:
.col-sm-7
ui-select(ng-model="fields.account")
Expand Down
4 changes: 1 addition & 3 deletions app/partials/transaction.jade
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
label(translate="FROM:")
p.text.mbs {{::from}}
.tx-receiver
label
span(translate="TO")
|:
label(translate="TO:")
ul.pln.flex-column.flex.type-sm
li.flex-center.mbm(ng-repeat="destination in destinations")
span.text-overflow-hidden.flex-1.flex.text
Expand Down
2 changes: 1 addition & 1 deletion app/partials/transactions.jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
translate="{{ f }}"
)
.filter-search
input(type="text" placeholder="{{ 'SEARCH' | translate }}" ng-model="searchText")
input(type="text" placeholder="Search by Account name or Address" ng-model="searchText")
i.ti-search
.transaction-feed
.flex-center.flex-justify.flex-column.mtvl(ng-hide="loading || getTotal(accountIndex) > 0 || (transactions | filter:transactionFilter).length > 0 || selectedAccountIndex == 'imported'")
Expand Down
4 changes: 3 additions & 1 deletion app/templates/destination-input.jade
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
type="text"
tabindex="1"
autocomplete="off"
placeholder="Paste or scan an address or select a destination"
placeholder="Paste or scan an address or select an account"
ng-model="model.address"
ng-hide="model.type === 'Accounts'"
ng-blur="blur()"
Expand All @@ -29,6 +29,8 @@
span.caret
span.sr-only Toggle Dropdown
ul.uib-dropdown-menu.dropdown-menu-right.drop-menu
li.dropdown-header
| Accounts
li(ng-repeat="account in accounts")
a(ng-click="setModel(account)" ng-disabled="true")
| {{ account.label }}
8 changes: 8 additions & 0 deletions assets/js/controllers/accountForm.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ function AccountFormCtrl($scope, Wallet, $uibModalInstance, $log, $translate, ac
$scope.status.busy = false;
$uibModalInstance.dismiss("");
Wallet.saveActivity(3);
$translate(['SUCCESS', 'ACCOUNT_CREATED']).then(translations => {
$scope.$emit('showNotification', {
type: 'created-account',
icon: 'ti-layout-list-post',
heading: translations.SUCCESS,
msg: translations.ACCOUNT_CREATED
});
});
};

const error = () => {$scope.status.busy = false;}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/controllers/request.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function RequestCtrl($scope, Wallet, Alerts, currency, $uibModalInstance, $log,
for(const account of $scope.accounts()) {
if (account.index != null && !account.archived) {
let acct = angular.copy(account);
acct.type = "";
acct.type = "Accounts";
$scope.destinations.push(acct);
if ((destination != null) && (destination.index != null) && destination.index === acct.index) {
$scope.fields.to = acct;
Expand Down
4 changes: 2 additions & 2 deletions assets/js/controllers/send.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function SendCtrl($scope, $log, Wallet, Alerts, currency, $uibModalInstance, $ti
} else {
let dest = destinations[0];
$scope.toLabel = dest.index == null ?
dest.label || dest.address : `${dest.label}`;
dest.label || dest.address : `${dest.label} Account`;
}
};

Expand Down Expand Up @@ -271,7 +271,7 @@ function SendCtrl($scope, $log, Wallet, Alerts, currency, $uibModalInstance, $ti
balance: origin.balance,
archived: origin.archived
};
formatted.type = origin.index != null ? '' : 'Imported Addresses';
formatted.type = origin.index != null ? 'Accounts' : 'Imported Addresses';
if (origin.index == null) formatted.isWatchOnly = origin.isWatchOnly;
return formatted;
};
Expand Down
2 changes: 1 addition & 1 deletion assets/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function AppRouter($stateProvider, $urlRouterProvider) {
}
})
.state('wallet.common.settings.accounts_index', {
url: '/addresses',
url: '/accounts',
views: {
settings: {
templateUrl: 'partials/settings/accounts.jade',
Expand Down
43 changes: 23 additions & 20 deletions locales/en-human.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
"LOGIN_HELP": "Login Help",
"LOGIN_HELP_TEXT": "Need help accessing your wallet?",
"CREATE_WALLET": "Create Wallet",
"NEW_ACCOUNT": "Add +",
"ACCOUNTS": "Accounts",
"NEW_ACCOUNT": "Add Account +",
"MY_TRANSACTIONS": "Transactions",
"ALL": "All",
"ACCOUNT": "Account",
"SEND_FEEDBACK": "Send Feedback",
"BACK": "Back",
"CONTACT_SUPPORT": "Contact Support",
Expand Down Expand Up @@ -66,7 +68,7 @@
"LANGUAGE" : "Wallet Language",
"PREFERENCES" : "Preferences",
"PREFERENCES_EXPLAIN" : "Customize your wallet experience.",
"MENU_ACCOUNTS_AND_ADDRESSES" : "Addresses",
"MENU_ACCOUNTS_AND_ADDRESSES" : "Accounts & Addresses",
"WALLET_INFO" : "Wallet Information",
"WALLET_INFO_EXPLAIN" : "Use the Wallet ID to log in via our web client or scan the code below with your iPhone or Android Blockchain Wallet App to access your wallet on your mobile.",
"PAIRING_CODE" : "Mobile App Pairing Code",
Expand Down Expand Up @@ -117,20 +119,20 @@
"CANCEL_EDIT_NOTE" : "Cancel",
"WALLET_RECOVERY_PHRASE" : "Wallet Recovery Phrase",
"RECOVERY_PHRASE" : "Recovery Phrase",
"RECOVERY_PHRASE_EXPLAIN" : "Your recovery phrase can be used to restore all your funds in the case of a lost password or a loss of service at Blockchain. Note, that the recovery phrase never changes and recovers all of your existing bitcoins as well as newly received funds in this wallet. Please note that imported addresses are not backed up by the wallet recovery phrase. We strongly recommend to transfer funds from imported addresses into this wallet.",
"RECOVERY_PHRASE_EXPLAIN" : "Your recovery phrase can be used to restore all your funds in the case of a lost password or a loss of service at Blockchain. Note, that the recovery phrase never changes and recovers all of your existing bitcoins as well as newly received funds in this wallet. Please note that imported addresses are not backed up by the wallet recovery phrase. We strongly recommend to transfer funds from imported addresses into an account in this wallet.",
"CONFIRM_RECOVERY_PHRASE" : "Backup Phrase",
"RECOVERY_ERROR": "Unable to import now, please try again.",
"NEXT_STEP" : "Next Step",
"NEXT" : "Next",
"EMAIL" : "Email",
"NEW_ACCT_WELCOME" : "Create A New Blockchain Wallet",
"CREATE_NEW_ACCOUNT" : "Create New",
"CREATE_ACCOUNT" : "Create New",
"CREATE_NEW_ACCOUNT" : "Create New Account",
"CREATE_ACCOUNT" : "Create Account",
"CREATE_ADDRESS" : "New Address",
"ACCOUNT_NAME" : "Name:",
"ACCOUNT_NAME" : "Account Name:",
"REVEAL_XPUB" : "Show xPub",
"MANAGE_ADDRESSES" : "Manage Addresses",
"ACCOUNT_XPUB_MODAL_TITLE" : "Extended Public Key",
"ACCOUNT_XPUB_MODAL_TITLE" : "Account xPub",
"PENDING" : "Pending",
"COMPLETE" : "Complete",
"TRANSACTION_COMPLETE" : "Transaction Complete",
Expand All @@ -141,8 +143,10 @@
"FROM" : "From",
"FROM:" : "From:",
"TO" : "To",
"TO:" : "To:",
"FEE" : "Fee",
"TOTAL" : "Total",
"TO_ACCOUNT" : "To Account",
"INTERNAL" : "Internal",
"GOOGLE_AUTH_CODE" : "Google Authenticator",
"SMS_CODE" : "SMS Code",
Expand Down Expand Up @@ -172,7 +176,8 @@
"HANDLE_BITCOIN_LINKS_EXPLAIN" : "Enable this to allow your Blockchain Wallet to handle bitcoin payment links in the web browser. This will make your experience more convenient when transacting online.",
"SET_HANDLE_BITCOIN_LINKS" : "Enable",
"HANDLE_BITCOIN_LINKS_STATUS_UNKNOWN" : "We can't detect whether or not handling of bitcoin links has been enabled. If it has already been enabled, nothing will happen.",
"ACCOUNT_MANAGEMENT_EXPLAIN" : "You can customize the way you organize your bitcoins in your Blockchain Wallet. You may find this useful when you would like to separate your funds between personal and business expenses, or put your savings aside.",
"ACCOUNT_MANAGEMENT" : "Account Management",
"ACCOUNT_MANAGEMENT_EXPLAIN" : "Your Blockchain Wallet can create separate accounts within your single wallet. You may find this feature useful when you would like to separate your funds between a savings account and a spending account, or between a personal account and a business account.",
"BALANCE" : "Balance",
"MAKE_DEFAULT" : "Make default",
"RENAME" : "Rename",
Expand Down Expand Up @@ -202,7 +207,7 @@
"DISABLE_BLOCK_TOR" : "Allow",
"ALLOWED" : "Allowed",
"BLOCKED" : "Blocked",
"RENAME_ACCOUNT" : "Name",
"RENAME_ACCOUNT" : "Rename Account",
"RENAME" : "Rename",
"TRANSACTION_WILL_COMPLETE_IN" : "This transaction will complete in approximately {{ minutes }} minutes.",
"SPENDABLE_ADDRESSES" : "Spendable Addresses",
Expand All @@ -222,7 +227,7 @@
"IMPORT_BITCOIN_ADDRESS" : "Import Existing Bitcoin Address",
"IMPORT_BITCOIN_ADDRESS_SWEEP" : "Transfer Funds from Imported Address",
"IMPORT_BITCOIN_ADDRESS_EXPLAIN" : "Your wallet automatically creates new bitcoin addresses as it needs them. You can optionally import an existing address and transfer the funds to your wallet if you have the corresponding Private Key. This is an advanced functionality and only suggested for advanced users.",
"CONFIRM_NOT_SWEEP" : "Are you sure? We recommend that you sweep these funds.",
"CONFIRM_NOT_SWEEP" : "Are you sure? We recommend that you sweep these funds into an account.",
"YOUR_PRIVATE_KEY" : "Show Private Key",
"PRIVATE_KEY_VALID" : "The Private Key appears to be <b>Valid</b>",
"ADDRESS_VALID" : "The Bitcoin address is valid",
Expand Down Expand Up @@ -328,6 +333,7 @@
"BITCOIN_CURRENCY_EXPLAIN": "Adjust the precision you would prefer bitcoin values to be displayed in.",
"JUST_RECEIVED_BITCOIN" : "You've just received Bitcoin!",
"SUCCESS" : "Success!",
"ACCOUNT_CREATED" : "You've successfully created an account",
"BITCOIN_SENT" : "You've successfully sent bitcoin",
"NO_TRANSACTIONS_YET" : "Your Transactions",
"SORRY_ZERO_TXS" : "Sorry, we couldn't find any transactions!",
Expand Down Expand Up @@ -408,10 +414,10 @@
"EMAIL_VERIFIED" : "Email Verified",
"LAUNCHED" : "We've launched!",
"GET_STARTED" : "Get Started",
"WELCOME_TEXT" : "We've launched our wallet! And we're excited to show you all the great features we've added. A brand new Security Center, revamped algorithms and a shiny new interface to name a few - go ahead, get started!",
"WELCOME_TEXT" : "We've launched our wallet! And we're excited to show you all the great features we've added. A brand new Security Center, account management, revamped algorithms and a shiny new interface to name a few - go ahead, get started!",
"TOS" : "ToS",
"PRIVACY" : "Privacy Policy",
"CREATE_NEW_ACCOUNT_MODAL" : "Divide your wallet to better allocate, track and manage your bitcoins. Some common names include Savings, Spending, and Business Expenses.",
"CREATE_NEW_ACCOUNT_MODAL" : "Divide your wallet into multiple accounts to better allocate, track and manage your funds. Some common account names include Savings, Spending, and Business Expenses.",
"TRANSACTION_DETAIL_STATUS" : "Your transaction has been submitted to the bitcoin network and is waiting for miners to validate the transaction. A transaction is considered to be confirmed when there are 3 network confirmations.",
"SEND_BITOIN_STEP2B" : "Add a note to remind yourself of what this transaction relates to. This note will be private and only seen by you, unless you select the Make Public option. If a note is public, anyone viewing the transaction on Blockchain will be able to read your note.",
"ADVANCED_SEND_STEP_1" : "A normal miners fee is recommended for most transactions. You can override this recommendation but be advised that lower fees may take several days to confirm.",
Expand All @@ -420,7 +426,7 @@
"VALUE_NOW" : "Value Now",
"VERIFY_ON_BCI" : "Verify on Blockchain.info",
"ARE_YOU_SURE" : "We just want to double check! Are you sure you wish to proceed? Remember you cannot go back to your old wallet :)",
"ACCOUNT_NAME_TAKEN" : "That name is already in use",
"ACCOUNT_NAME_TAKEN" : "That account name is already in use",
"EMAIL_ADDRESS_TOOLTIP" : "Your verified email address is used to send login codes when unusual activity is detected and to send bitcoin payment alerts when you receive funds.",
"RECOVERY_PHRASE_TOOLTIP" : "Your recovery phrase allows you to restore your wallet in case of loss of password or extended downtime on our servers.",
"PASSWORD_HINT_TOOLTIP" : "Allows us to send your password hint to your verified email address in case you forget your password.",
Expand Down Expand Up @@ -455,7 +461,7 @@
"LOGGING" : "Activity Logging",
"LOG" : "Log",
"LOGGING_EXPLAIN" : "Record wallet activity and display it in your activity feed.",
"ACTIVITY_1": "Addresses",
"ACTIVITY_1": "Accounts",
"ACTIVITY_1_DESC": "Created My Bitcoin Wallet",
"ACTIVITY_2_DESC": "Set password",
"ACTIVITY_3_DESC": "Created wallet!",
Expand All @@ -468,7 +474,7 @@
"EDIT_NOTE": "Edit",
"DELETE_NOTE": "Delete",
"ALPHA_WARNING": "Please note, this is an Alpha of a new product. Please do not test this wallet with more funds than you are willing to lose.",
"XPUB_WARNING": "You should only give this Extended Public Key (xPub) to those you trust. With this information, they may be able to keep track of your payments, and may be able to disrupt your access to your wallet.",
"XPUB_WARNING": "You should only give this Public Key to those you trust. With this information, they may be able to keep track of your payments, and may be able to disrupt your access to your wallet.",
"LOST_WALLET_ID": "I've lost my Wallet ID",
"LOST_WALLET_PWD": "I've lost my Wallet Password",
"LOST_2FA": "I've lost my 2FA Device",
Expand All @@ -495,7 +501,7 @@
"REDIRECTING": "We're redirecting you to your wallet now!",
"TAKES_A_WHILE": "This may take a while. If your browser asks if you want to cancel the script, please press continue.",
"NOTIFICATIONS" : "Email Notifications",
"NOTIFICATIONS_EXPLAIN" : "Enable notifications to receive an email whenever you receive bitcoins. Only labeled addresses and imported addresses are eligible to trigger notifications.",
"NOTIFICATIONS_EXPLAIN" : "Enable notifications to receive an email whenever you receive bitcoins. Only labeled addresses in your accounts and imported addresses are eligible to trigger notifications.",
"VERIFY_EMAIL_FIRST" : "Please verify your email address first.",
"UNSUBSCRIBE_SUCCESS" : "We have removed your email address (and phone number) from our systems.",
"AUTHORIZE_APPROVE_SUCCESS" : "Login approved! Please return to your previous browser / tab to see your wallet.",
Expand All @@ -509,8 +515,5 @@
"IP_ADDRESS" : "IP Address",
"COUNTRY_OF_ORIGIN" : "Country Of Origin",
"AUTHORIZE_REJECT_SUCCESS" : "Login attempt rejected! Please contact support if this was not you.",
"CHECKING_LOGIN_ATTEMPT" : "Checking login attempt",
"SEARCH" : "Search",
"BALANCES" : "Balances",
"MUST_SELECT_ORIGIN" :"Must select where to send from"
"CHECKING_LOGIN_ATTEMPT" : "Checking login attempt"
}
7 changes: 7 additions & 0 deletions tests/controllers/account_form_ctrl_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ describe "AccountFormCtrl", ->
expect(Wallet.accounts()[Wallet.accounts().length - 1].label).toBe("New Account")
)

it "should show a confirmation modal", inject(($uibModal)->
spyOn($uibModal, "open").and.callThrough()
scope.createAccount()
expect($uibModal.open).toHaveBeenCalled()
expect($uibModal.open.calls.argsFor(0)[0].windowClass).toEqual("notification-modal")
)

describe "rename", ->

it "original name should be shown", ->
Expand Down
2 changes: 1 addition & 1 deletion tests/controllers/send_ctrl_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ describe "SendCtrl", ->
it "should set the label to an account", ->
scope.transaction.destinations[0] = scope.accounts()[0]
scope.updateToLabel()
expect(scope.toLabel).toEqual('Checking')
expect(scope.toLabel).toEqual('Checking Account')

it "should set the label when advanced", ->
scope.advanced = true
Expand Down

0 comments on commit b075741

Please sign in to comment.