Skip to content

Commit

Permalink
fix(transaction-list): do not consider every contract with tip/retip …
Browse files Browse the repository at this point in the history
…function as tipping
  • Loading branch information
CedrikNikita committed Aug 12, 2022
1 parent f001dab commit ebcceba
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/popup/router/components/TransactionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export default {
...mapState(['transactions']),
...mapState({
filteredTransactions(
{ transactions: { loaded } }, { account: { address }, getAccountPendingTransactions },
{ transactions: { loaded } },
{ account: { address }, activeNetwork, getAccountPendingTransactions },
) {
const isFungibleTokenTx = (tr) => Object.keys(this.availableTokens)
.includes(tr.tx.contractId);
Expand All @@ -103,9 +104,9 @@ export default {
&& this.compareCaseInsensitive(tr.tx.type, SCHEMA.TX_TYPE.contractCall)
&& tr.recipient === address);
case 'tips':
return (!isFungibleTokenTx(tr)
&& this.compareCaseInsensitive(tr.tx.type, SCHEMA.TX_TYPE.contractCall)
&& tr.tx.callerId === address
return (tr.tx.contractId
&& (activeNetwork.tipContractV1 === tr.tx.contractId
|| activeNetwork.tipContractV2 === tr.tx.contractId)
&& (tr.tx.function === 'tip' || tr.tx.function === 'retip')) || tr.claim;
default:
throw new Error(`Unknown display mode type: ${this.displayMode.filter}`);
Expand Down Expand Up @@ -189,10 +190,6 @@ export default {
display: flex;
flex-direction: column;
.filters {
z-index: 1;
}
.list {
background: variables.$color-black;
padding: 0;
Expand Down

0 comments on commit ebcceba

Please sign in to comment.