Added test to transactionHistoryCvs
This commit is contained in:
parent
ae9b79b843
commit
3c238ca064
3 changed files with 80 additions and 13 deletions
|
|
@ -28,12 +28,19 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
|
||||
$scope.generating = true;
|
||||
|
||||
//getTransactionHistoryCSV
|
||||
w.getTransactionHistoryCsv(function(csvContent) {
|
||||
if (csvContent && csvContent !== 'ERROR') {
|
||||
var filename = "copay_history.csv";
|
||||
|
||||
w.getTransactionHistoryCsv(function() {
|
||||
var encodedUri = encodeURI(csvContent);
|
||||
var link = document.createElement("a");
|
||||
link.setAttribute("href", encodedUri);
|
||||
link.setAttribute("download", filename);
|
||||
|
||||
link.click();
|
||||
}
|
||||
$scope.generating = false;
|
||||
$scope.$digest();
|
||||
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue