Skip to content

Commit

Permalink
fix: update emulator logic branch
Browse files Browse the repository at this point in the history
  • Loading branch information
joacohoyos committed Aug 1, 2023
1 parent d9effdd commit a549b40
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 16 deletions.
8 changes: 4 additions & 4 deletions dist/esm/src/lucid/lucid.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ export class Lucid {
}
if (provider) {
lucid.provider = provider;
}
if (provider && !protocolParameters) {
const protocolParams = await provider.getProtocolParameters();
lucid.protocolParameters = protocolParams;
if (lucid.provider instanceof Emulator) {
lucid.network = "Custom";
SLOT_CONFIG_NETWORK[lucid.network] = {
Expand All @@ -69,6 +65,10 @@ export class Lucid {
};
}
}
if (provider && !protocolParameters) {
const protocolParams = await provider.getProtocolParameters();
lucid.protocolParameters = protocolParams;
}
if (lucid.protocolParameters) {
const slotConfig = SLOT_CONFIG_NETWORK[lucid.network];
lucid.txBuilderConfig = C.TransactionBuilderConfigBuilder.new()
Expand Down
122 changes: 121 additions & 1 deletion dist/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions dist/src/src/lucid/lucid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ export class Lucid {
}
if (provider) {
lucid.provider = provider;
}
if (provider && !protocolParameters) {
const protocolParams = await provider.getProtocolParameters();
lucid.protocolParameters = protocolParams;

if (lucid.provider instanceof Emulator) {
lucid.network = "Custom";
SLOT_CONFIG_NETWORK[lucid.network] = {
Expand All @@ -82,6 +77,10 @@ export class Lucid {
};
}
}
if (provider && !protocolParameters) {
const protocolParams = await provider.getProtocolParameters();
lucid.protocolParameters = protocolParams;
}
if (lucid.protocolParameters) {
const slotConfig = SLOT_CONFIG_NETWORK[lucid.network];
lucid.txBuilderConfig = C.TransactionBuilderConfigBuilder.new()
Expand Down
Loading

0 comments on commit a549b40

Please sign in to comment.