added transaction_list call

This commit is contained in:
Akinwale Ariwodola 2018-05-02 07:34:11 +01:00
parent b5e777ef91
commit fbf3531fc3
2 changed files with 12 additions and 2 deletions

11
dist/bundle.js vendored
View file

@ -1863,6 +1863,12 @@ Lbry.wallet_unlock = function () {
return daemonCallWithResult('wallet_unlock', params);
};
// transactions
Lbry.transaction_list = function () {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return daemonCallWithResult('transaction_list', params);
};
Lbry.connectPromise = null;
Lbry.connect = function () {
if (Lbry.connectPromise === null) {
@ -1893,12 +1899,13 @@ Lbry.getMediaType = function (contentType, fileName) {
);
} else if (fileName) {
var formats = [[/^.+\.(mp4|m4v|webm|flv|f4v|ogv)$/i, 'video'], [/^.+\.(mp3|m4a|aac|wav|flac|ogg|opus)$/i, 'audio'], [/^.+\.(html|htm|xml|pdf|odf|doc|docx|md|markdown|txt|epub|org)$/i, 'document']];
var res = formats.reduce(function extensionMatch(ret, testpair) {
var res = formats.reduce(function (ret, testpair) {
switch (testpair[0].test(ret)) {
case true:
return testpair[1];
default:
return ret;}
return ret;
}
}, fileName);
return res === fileName ? 'unknown' : res;
}

View file

@ -77,6 +77,9 @@ Lbry.wallet_encrypt = (params = {}) => daemonCallWithResult('wallet_encrypt', pa
Lbry.wallet_decrypt = () => daemonCallWithResult('wallet_decrypt', {});
Lbry.wallet_unlock = (params = {}) => daemonCallWithResult('wallet_unlock', params);
// transactions
Lbry.transaction_list = (params = {}) => daemonCallWithResult('transaction_list', params);
Lbry.connectPromise = null;
Lbry.connect = () => {
if (Lbry.connectPromise === null) {