Merge pull request #145 from JDonadio/feat/open-tx-modal
Open tx/txp modal without navigation
This commit is contained in:
commit
e5b237bb7a
11 changed files with 226 additions and 84 deletions
|
|
@ -32,6 +32,7 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti
|
|||
'sweepingWallet': gettext('Sweeping Wallet...'),
|
||||
'validatingWallet': gettext('Validating wallet integrity...'),
|
||||
'validatingWords': gettext('Validating recovery phrase...'),
|
||||
'loadingTxInfo': gettext('Loading transaction info...'),
|
||||
};
|
||||
|
||||
root.clear = function() {
|
||||
|
|
|
|||
|
|
@ -822,11 +822,11 @@ angular.module('copayApp.services')
|
|||
|
||||
x.action = function() {
|
||||
// TODO?
|
||||
$state.go('tabs.details', {
|
||||
walletId: x.walletId,
|
||||
txpId: x.txpId,
|
||||
txid: x.txid,
|
||||
});
|
||||
// $state.go('tabs.details', {
|
||||
// walletId: x.walletId,
|
||||
// txpId: x.txpId,
|
||||
// txid: x.txid,
|
||||
// });
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -502,6 +502,32 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
});
|
||||
};
|
||||
|
||||
root.getTx = function(wallet, txid, cb) {
|
||||
var tx;
|
||||
|
||||
if (wallet.completeHistory && wallet.completeHistory.isValid) {
|
||||
tx = lodash.find(wallet.completeHistory, {
|
||||
txid: txid
|
||||
});
|
||||
|
||||
finish();
|
||||
} else {
|
||||
root.getTxHistory(wallet, {}, function(err, txHistory) {
|
||||
if (err) return cb(err);
|
||||
|
||||
tx = lodash.find(txHistory, {
|
||||
txid: txid
|
||||
});
|
||||
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
function finish() {
|
||||
if (tx) return cb(null, tx);
|
||||
else return cb();
|
||||
};
|
||||
};
|
||||
|
||||
root.getTxHistory = function(wallet, opts, cb) {
|
||||
opts = opts || {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue