fix: no tolowercase

This commit is contained in:
promaster1332 2023-09-21 11:04:03 +01:00 committed by Koray Koska
parent ddb53abbed
commit f571ca8013
No known key found for this signature in database
GPG Key ID: 1AE887EC6D5ECD63
2 changed files with 6 additions and 2 deletions

@ -41,6 +41,10 @@ module.exports = {
Contracts.forEach(({ address, name, network, amount, currency }) => { Contracts.forEach(({ address, name, network, amount, currency }) => {
if (network === env && address != null) { if (network === env && address != null) {
contractsToInstancesContent += `contractsToInstances.set("${address.toLowerCase()}",${space}//${space}${name}-${currency}-${amount}${newLine}${doubleSpace}"${currency}${'-'}${amount}"${newLine});${newLine}`; contractsToInstancesContent += `contractsToInstances.set("${address.toLowerCase()}",${space}//${space}${name}-${currency}-${amount}${newLine}${doubleSpace}"${currency}${'-'}${amount}"${newLine});${newLine}`;
contractsToInstancesContent += `contractsToInstances.set("0x${address
.replace('0x', '')
.toUpperCase()}",${space}//${space}${name}-${currency}-${amount}${newLine}${doubleSpace}"${currency}${'-'}${amount}"${newLine});${newLine}`;
contractsToInstancesContent += `contractsToInstances.set("${address}",${space}//${space}${name}-${currency}-${amount}${newLine}${doubleSpace}"${currency}${'-'}${amount}"${newLine});${newLine}`;
} }
if (network === env) { if (network === env) {
reExportContent += `${readOnlyComment}${newLine}export * from "./${name}-${amount}-${currency}/Instance";${newLine}`; reExportContent += `${readOnlyComment}${newLine}export * from "./${name}-${amount}-${currency}/Instance";${newLine}`;

@ -6,7 +6,7 @@ import { contractsToInstances } from './contractsToInstances';
export function handleWithdrawal(event: Withdrawal): void { export function handleWithdrawal(event: Withdrawal): void {
let entity = new WithdrawalEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); let entity = new WithdrawalEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString());
let result = contractsToInstances.get((`${event.address.toHexString()}` as string).toLowerCase()).split('-'); let result = contractsToInstances.get(event.address.toHexString()).split('-');
entity.amount = result[1]; entity.amount = result[1];
entity.currency = result[0]; entity.currency = result[0];
@ -25,7 +25,7 @@ export function handleWithdrawal(event: Withdrawal): void {
export function handleDeposit(event: Deposit): void { export function handleDeposit(event: Deposit): void {
let entity = new DepositEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); let entity = new DepositEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString());
let result = contractsToInstances.get((`${event.address.toHexString()}` as string).toLowerCase()).split('-'); let result = contractsToInstances.get(event.address.toHexString()).split('-');
entity.amount = result[1]; entity.amount = result[1];
entity.currency = result[0]; entity.currency = result[0];