Browse Source

v1.1.5.1

- More specific on deposit transactions
- Crypto Pay purchases support
- Competition Reward support
- Ignore Crypto Credit transactions for now (until fixed)
- Fix TRANSFER transactions not calculated in summary
master v1.1.5.1
Jaryl Chng 6 months ago
parent
commit
1154e71b7d
Signed by: jarylc GPG Key ID: A7174FB4C337FA37
2 changed files with 35 additions and 15 deletions
  1. +14
    -3
      src/components/Import.vue
  2. +21
    -12
      src/components/Process.vue

+ 14
- 3
src/components/Import.vue View File

@ -120,11 +120,22 @@ export default {
transaction = new Transaction();
// other transactions
if (desc.includes("Unlocked") || desc.includes("Crypto Earn") || desc.includes("Rewards") || desc.includes("Referral Bonus") || desc.includes("Cashback") || desc.includes("Card Rebate:")) {
if (desc.includes("Unlocked") ||
desc === "Crypto Earn" ||
desc.includes("Stake Rewards") ||
desc === "Staking Rewards" ||
desc === "Pay Rewards" ||
desc === "Competition Reward" ||
desc.includes("Referral Bonus") ||
desc === "Card Cashback" ||
desc.includes("Card Rebate:")) {
transaction.deposit(date, quantity, currency);
transaction.notes = desc;
} else if (desc.includes("Buy") || (desc.includes("Deposit") && !desc.includes("Earn"))) {
} else if (desc.includes("Buy") || (desc.includes("Deposit") && !desc.includes("Earn") && !desc.includes("Credit"))) {
transaction.trade(date, quantity, currency, quantityNative, currencyNative);
} else if (desc.includes("Crypto Pay")) {
transaction.trade(date, quantityNative, currencyNative, quantity, currency);
transaction.notes = desc
} else if (desc.includes("->")) {
if (quantityTo !== "")
transaction.trade(date, quantityTo, currencyTo, quantity, currency);
@ -138,7 +149,7 @@ export default {
if (desc.includes("Transfer"))
transaction.notes = desc
} else if (desc.includes("Withdraw") && !desc.includes("Earn")) {
} else if (desc.includes("Withdraw") && !desc.includes("Earn") && !desc.includes("Credit")) {
transaction.trade(date, quantityNative, currencyNative, quantity, currency);
transaction.notes = desc;
} else if (desc.includes("Reversal")) {

+ 21
- 12
src/components/Process.vue View File

@ -58,19 +58,19 @@
</template>
<script>
import {Strings} from "../resources/strings";
import {Strings} from "../resources/strings";
export default {
name: 'Process',
props: {
processed: []
},
data: function () {
return {
strings: Strings.default()
}
},
created: function () {
export default {
name: 'Process',
props: {
processed: []
},
data: function () {
return {
strings: Strings.default()
}
},
created: function () {
window.scrollTo(0, 0);
},
computed: {
@ -101,6 +101,15 @@
case "WITHDRAW":
totals[transaction.baseCurrency] = totals[transaction.baseCurrency] - parseFloat(transaction.baseAmount);
break;
case "TRANSFER":
if (!(transaction.baseCurrency in totals))
totals[transaction.baseCurrency] = 0.0;
if (transaction.to === "MY_WALLET") {
totals[transaction.baseCurrency] = totals[transaction.baseCurrency] + parseFloat(transaction.baseAmount);
} else {
totals[transaction.baseCurrency] = totals[transaction.baseCurrency] - parseFloat(transaction.baseAmount);
}
break;
}
});

Loading…
Cancel
Save