Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#806 | Contract Creation transaction fixed #809

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading