diff --git a/mustache/templates/instance/create-yaml.js b/mustache/templates/instance/create-yaml.js index 9f1cf6a..57d2c1b 100644 --- a/mustache/templates/instance/create-yaml.js +++ b/mustache/templates/instance/create-yaml.js @@ -42,7 +42,7 @@ module.exports = { if (network === env && address != null) { contractsToInstancesContent += `contractsToInstances.set("${address.toLowerCase()}",${space}//${space}${name}-${currency}-${amount}${newLine}${doubleSpace}"${currency}${'-'}${amount}"${newLine});${newLine}`; } - if (network === env && reExportContent === '') { + if (network === env) { reExportContent += `${readOnlyComment}${newLine}export * from "./${name}-${amount}-${currency}/Instance";${newLine}`; } }); diff --git a/src/mapping-instance.ts b/src/mapping-instance.ts index e2b85ae..4443a6d 100644 --- a/src/mapping-instance.ts +++ b/src/mapping-instance.ts @@ -6,7 +6,7 @@ import { contractsToInstances } from './contractsToInstances'; export function handleWithdrawal(event: Withdrawal): void { let entity = new WithdrawalEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); - let result = contractsToInstances.get(event.address.toHexString()).split('-'); + let result = contractsToInstances.get(event.address.toHexString().toLowerCase()).split('-'); entity.amount = result[1]; entity.currency = result[0]; @@ -25,7 +25,7 @@ export function handleWithdrawal(event: Withdrawal): void { export function handleDeposit(event: Deposit): void { let entity = new DepositEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); - let result = contractsToInstances.get(event.address.toHexString()).split('-'); + let result = contractsToInstances.get(event.address.toHexString().toLowerCase()).split('-'); entity.amount = result[1]; entity.currency = result[0];