Skip to content

Commit

Permalink
Account index
Browse files Browse the repository at this point in the history
  • Loading branch information
Sluder committed Aug 31, 2024
1 parent b039e4b commit e8fe91c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/dex/sundaeswap-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ export class SundaeSwapV3 extends BaseDex {
),
addressType: AddressType.Contract,
assetBalances: [
{
asset: 'lovelace',
quantity: this.protocolFeeDefault + deposit.value,
},
{
asset: 'lovelace',
quantity: this.protocolFeeDefault + deposit.value,
},
],
datum: datumBuilder.getCbor(),
isInlineDatum: true,
Expand Down
13 changes: 12 additions & 1 deletion src/providers/wallet/lucid-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,18 @@ export class LucidProvider extends BaseWalletProvider {
return this.loadLucid(config)
.then((lucid: LucidEvolution) => {
this._api = lucid;
this._api.selectWallet.fromSeed(seed.join(' '));

const addressType: 'Base' | 'Enterprise' = options.addressType === AddressType.Enterprise
? 'Enterprise'
: 'Base';

this._api.selectWallet.fromSeed(
seed.join(' '),
{
addressType: addressType,
accountIndex: options.accountIndex ?? 0,
},
);

return this.loadWalletInformation();
});
Expand Down

0 comments on commit e8fe91c

Please sign in to comment.