remove address sort for youtube transfer so it doesn't accidentally grab the wrong address

This commit is contained in:
Sean Yesmunt 2020-05-29 11:14:48 -04:00
parent 9c2939ab37
commit 39510e8b21
3 changed files with 3 additions and 5 deletions

2
dist/bundle.es.js vendored
View file

@ -1987,7 +1987,7 @@ function doClaimYoutubeChannels() {
return lbryRedux.Lbry.address_list({
page: 1,
page_size: 99999
}).then(addressList => addressList.items.sort((a, b) => a.used_times - b.used_times)[0]).then(address => Lbryio.call('yt', 'transfer', {
}).then(addressList => addressList.items[0]).then(address => Lbryio.call('yt', 'transfer', {
address: address.address,
public_key: address.pubkey
}).then(response => {

4
dist/bundle.js vendored
View file

@ -5760,9 +5760,7 @@ function doClaimYoutubeChannels() {
page: 1,
page_size: 99999
}).then(function (addressList) {
return addressList.items.sort(function (a, b) {
return a.used_times - b.used_times;
})[0];
return addressList.items[0];
}).then(function (address) {
return lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('yt', 'transfer', {
address: address.address,

View file

@ -711,7 +711,7 @@ export function doClaimYoutubeChannels() {
let transferResponse;
return Lbry.address_list({ page: 1, page_size: 99999 })
.then(addressList => addressList.items.sort((a, b) => a.used_times - b.used_times)[0])
.then(addressList => addressList.items[0])
.then(address =>
Lbryio.call('yt', 'transfer', {
address: address.address,