added transaction_list call
This commit is contained in:
parent
b5e777ef91
commit
fbf3531fc3
2 changed files with 12 additions and 2 deletions
11
dist/bundle.js
vendored
11
dist/bundle.js
vendored
|
@ -1863,6 +1863,12 @@ Lbry.wallet_unlock = function () {
|
||||||
return daemonCallWithResult('wallet_unlock', params);
|
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.connectPromise = null;
|
||||||
Lbry.connect = function () {
|
Lbry.connect = function () {
|
||||||
if (Lbry.connectPromise === null) {
|
if (Lbry.connectPromise === null) {
|
||||||
|
@ -1893,12 +1899,13 @@ Lbry.getMediaType = function (contentType, fileName) {
|
||||||
);
|
);
|
||||||
} else if (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 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)) {
|
switch (testpair[0].test(ret)) {
|
||||||
case true:
|
case true:
|
||||||
return testpair[1];
|
return testpair[1];
|
||||||
default:
|
default:
|
||||||
return ret;}
|
return ret;
|
||||||
|
}
|
||||||
}, fileName);
|
}, fileName);
|
||||||
return res === fileName ? 'unknown' : res;
|
return res === fileName ? 'unknown' : res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,9 @@ Lbry.wallet_encrypt = (params = {}) => daemonCallWithResult('wallet_encrypt', pa
|
||||||
Lbry.wallet_decrypt = () => daemonCallWithResult('wallet_decrypt', {});
|
Lbry.wallet_decrypt = () => daemonCallWithResult('wallet_decrypt', {});
|
||||||
Lbry.wallet_unlock = (params = {}) => daemonCallWithResult('wallet_unlock', params);
|
Lbry.wallet_unlock = (params = {}) => daemonCallWithResult('wallet_unlock', params);
|
||||||
|
|
||||||
|
// transactions
|
||||||
|
Lbry.transaction_list = (params = {}) => daemonCallWithResult('transaction_list', params);
|
||||||
|
|
||||||
Lbry.connectPromise = null;
|
Lbry.connectPromise = null;
|
||||||
Lbry.connect = () => {
|
Lbry.connect = () => {
|
||||||
if (Lbry.connectPromise === null) {
|
if (Lbry.connectPromise === null) {
|
||||||
|
|
Loading…
Reference in a new issue