Skip to content

Commit

Permalink
Merge pull request #809 from telosnetwork/806-transfers-to-null-addre…
Browse files Browse the repository at this point in the history
…ss-are-interpreted-as-contract-deployment-when-they-are-not

#806 | Contract Creation transaction fixed
  • Loading branch information
pmjanus authored Aug 6, 2024
2 parents d9f911a + 9bce31d commit 2e2de91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/components/TransactionAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { computed, ref, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { ZERO_ADDRESSES } from 'src/lib/utils';
import MethodField from 'components/MethodField.vue';
import AddressField from 'components/AddressField.vue';
import ValueField from 'components/ValueField.vue';
Expand All @@ -26,6 +25,7 @@ const props = defineProps({
to?: string | null;
input?: string;
hash?: string;
contractAddress?: string | null;
},
required: true,
},
Expand All @@ -46,7 +46,7 @@ onMounted(async () => {
const setValues = async () => {
if (propValue.value > 0 && props.trx.input === '0x') {
transactionCase.value = cases.TLOS_TRANSFER;
} else if (props.trx.to === null || props.trx.to === ZERO_ADDRESSES) {
} else if (props.trx.to === null || props.trx.contractAddress !== null) {
transactionCase.value = cases.CONTRACT_CREATION;
} else {
transactionCase.value = cases.FUNCTION_CALL;
Expand Down
27 changes: 0 additions & 27 deletions src/lib/data-export-utils.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,7 @@
// import { contractManager, indexerApi, exportApi } from 'src/boot/telosApi'; // FIXME: uncomment this line
// import { formatTimestamp } from 'src/lib/date-utils'; // FIXME: uncomment this line
// import { formatWei } from 'src/lib/utils'; // FIXME: uncomment this line
import { AxiosError } from 'axios';
import { exportApi } from 'src/boot/telosApi';
import { EXPORT_DOWNLOAD_TYPES } from 'src/lib/constants';

// import { EvmTransfer } from 'src/antelope/types/EvmTransaction'; // FIXME: uncomment this line

/**
* Escape a string value which is meant to be entered into a CSV
*
* @param value The value to escape
* @returns The escaped value
*/
/* // FIXME: uncomment this line
function escapeCSVValue(value: string) {
let escapedVal = value;
if (
escapedVal.includes(',') ||
escapedVal.includes('\n') ||
escapedVal.includes('"')
) {
escapedVal = `"${escapedVal.replace(/"/g, '""')}"`; // Escape quotes
}
return value;
}*/

/**
* Download a CSV file of transactions
*
Expand Down Expand Up @@ -101,7 +75,6 @@ export async function downloadCsv(
}

try {
console.log('url: ', url); // FIXME: remove this line
const { data } = await exportApi.get(url);
csvContent = data;
} catch (e) {
Expand Down

0 comments on commit 2e2de91

Please sign in to comment.