mirror of https://github.com/BTCPrivate/copay.git
show label and comment in view
This commit is contained in:
parent
d44b56d564
commit
ccb138f605
|
@ -3000,9 +3000,8 @@ Wallet.prototype.getTransactionHistory = function(cb) {
|
|||
});
|
||||
|
||||
var proposal = _.findWhere(proposals, {
|
||||
ntxid: tx.txid
|
||||
sentTxid: tx.txid
|
||||
});
|
||||
|
||||
tx.comment = proposal ? proposal.comment : undefined;
|
||||
tx.labelTo = firstOut ? firstOut.label : undefined;
|
||||
tx.amountSat = Math.abs(amount);
|
||||
|
@ -3010,7 +3009,8 @@ Wallet.prototype.getTransactionHistory = function(cb) {
|
|||
};
|
||||
|
||||
if (addresses.length > 0) {
|
||||
self.blockchain.getTransactions(addresses, function(err, txs) {
|
||||
var addressesStr = _.pluck(addresses, 'addressStr');
|
||||
self.blockchain.getTransactions(addressesStr, function(err, txs) {
|
||||
if (err) return cb(err);
|
||||
|
||||
var history = _.map(txs, function(tx) {
|
||||
|
|
|
@ -2163,10 +2163,10 @@ describe('Wallet model', function() {
|
|||
}]);
|
||||
|
||||
w.getTxProposals = sinon.stub().returns([{
|
||||
ntxid: 'id0',
|
||||
sentTxid: 'id0',
|
||||
comment: 'My comment',
|
||||
}, {
|
||||
ntxid: 'id1',
|
||||
sentTxid: 'id1',
|
||||
comment: 'Another comment',
|
||||
}]);
|
||||
w.getTransactionHistory(function(err, res) {
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row collapse" ng-show="wallet.isShared()">
|
||||
<div class="row collapse">
|
||||
<div class="large-12 columns">
|
||||
<div class="row collapse">
|
||||
<label for="comment"><span translate>Note</span>
|
||||
|
@ -117,7 +117,7 @@
|
|||
</label>
|
||||
<div class="large-12 columns">
|
||||
<textarea id="comment" ng-disabled="loading"
|
||||
name="comment" placeholder="{{'Leave a private message to your copayers'|translate}}" ng-model="commentText" ng-maxlength="100"></textarea>
|
||||
name="comment" placeholder="{{(wallet.isShared() ? 'Leave a private message to your copayers' : 'Add a private comment to identify the transaction') |translate}}" ng-model="commentText" ng-maxlength="100"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -52,7 +52,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="last-transactions-content">
|
||||
{{btx.action}}
|
||||
{{btx.action}} <span ng-show="btx.labelTo">to {{btx.labelTo}}</span>
|
||||
<span ng-show="btx.comment">{{btx.comment}}</span>
|
||||
</div>
|
||||
<div class="last-transactions-footer">
|
||||
<div class="row collapse">
|
||||
|
|
Loading…
Reference in New Issue