allow unlocking supports
This commit is contained in:
parent
9d9976d77a
commit
7ce6bdb6a4
4 changed files with 10 additions and 12 deletions
|
@ -117,7 +117,7 @@
|
|||
"jsmediatags": "^3.8.1",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#c8126ab21792d7a85e1123a2363af285a0263654",
|
||||
"lbry-redux": "lbryio/lbry-redux#c2d02502387e404daca3dd9c62a0aa7c50814ea8",
|
||||
"lbryinc": "lbryio/lbryinc#43d382d9b74d396a581a74d87e4c53105e04f845",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { selectClaimedRewardsByTransactionId } from 'lbryinc';
|
||||
import { doOpenModal } from 'redux/actions/app';
|
||||
import { selectAllMyClaimsByOutpoint, selectTransactionListFilter, doSetTransactionListFilter } from 'lbry-redux';
|
||||
import { selectSupportsById, selectTransactionListFilter, doSetTransactionListFilter } from 'lbry-redux';
|
||||
import TransactionList from './view';
|
||||
|
||||
const select = state => ({
|
||||
rewards: selectClaimedRewardsByTransactionId(state),
|
||||
myClaims: selectAllMyClaimsByOutpoint(state),
|
||||
mySupports: selectSupportsById(state),
|
||||
filterSetting: selectTransactionListFilter(state),
|
||||
});
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ type Props = {
|
|||
transactions: Array<Transaction>,
|
||||
rewards: {},
|
||||
openModal: (id: string, { nout: number, txid: string }) => void,
|
||||
myClaims: any,
|
||||
mySupports: {},
|
||||
filterSetting: string,
|
||||
setTransactionFilter: string => void,
|
||||
};
|
||||
|
@ -41,11 +41,9 @@ class TransactionList extends React.PureComponent<Props> {
|
|||
return this.props.filterSetting === TRANSACTIONS.ALL || this.props.filterSetting === transaction.type;
|
||||
}
|
||||
|
||||
isRevokeable(txid: string, nout: number) {
|
||||
const { myClaims } = this.props;
|
||||
// a claim/support/update is revokable if it
|
||||
// is in my claim list(claim_list_mine)
|
||||
return myClaims.has(`${txid}:${nout}`);
|
||||
isRevokeable(txid: string) {
|
||||
const { mySupports } = this.props;
|
||||
return !!mySupports[txid];
|
||||
}
|
||||
|
||||
revokeClaim(txid: string, nout: number) {
|
||||
|
@ -122,7 +120,7 @@ class TransactionList extends React.PureComponent<Props> {
|
|||
key={`${t.txid}:${t.nout}`}
|
||||
transaction={t}
|
||||
reward={rewards && rewards[t.txid]}
|
||||
isRevokeable={this.isRevokeable(t.txid, t.nout)}
|
||||
isRevokeable={this.isRevokeable(t.txid)}
|
||||
revokeClaim={this.revokeClaim}
|
||||
/>
|
||||
))}
|
||||
|
|
|
@ -6498,9 +6498,9 @@ lazy-val@^1.0.3, lazy-val@^1.0.4:
|
|||
yargs "^13.2.2"
|
||||
zstd-codec "^0.1.1"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#423123f1c19e61cead67c745d0892a2e4481cb6a:
|
||||
lbry-redux@lbryio/lbry-redux#c2d02502387e404daca3dd9c62a0aa7c50814ea8:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/423123f1c19e61cead67c745d0892a2e4481cb6a"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/c2d02502387e404daca3dd9c62a0aa7c50814ea8"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
|
|
Loading…
Reference in a new issue