Skip to content
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 examples/build-tx-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ export async function _multiRoutingTxExample(
});
}

export async function _cancelV2TxExample(
export function _cancelV2TxExample(
lucid: Lucid,
adapter: Adapter
): Promise<TxComplete> {
Expand Down Expand Up @@ -1032,7 +1032,7 @@ export async function _zapOutStableExample(
});
}

export async function _bulkOrderStableExample(
export function _bulkOrderStableExample(
lucid: Lucid,
address: string,
availableUtxos: Utxo[]
Expand Down
2 changes: 1 addition & 1 deletion src/dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Dao {
* This method builds a transaction with metadata that requests fee changes for a pool.
* The transaction must be signed by the pool manager address.
*/
async updatePoolFeeTx(
updatePoolFeeTx(
options: Omit<PoolFeeRequest, "version">
): Promise<TxComplete> {
const { managerAddress, poolLPAsset, newFeeA, newFeeB } = options;
Expand Down
2 changes: 1 addition & 1 deletion src/dex-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ export class DexV2 {
}
}

async createBulkOrdersTx({
createBulkOrdersTx({
sender,
orderOptions,
expiredOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/syncer/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function start(): Promise<void> {
}
}

async function main(): Promise<void> {
function main(): Promise<void> {
return backOff(start, {
retry(err, attempt): boolean {
console.error(`Fail to run syncer, retry ${attempt}...`, err);
Expand Down
3 changes: 1 addition & 2 deletions src/syncer/repository/postgres-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export class PostgresRepositoryWriter extends PostgresRepositoryWriterInTransact
this.prismaClientTx = prismaClient;
}

async transaction(
transaction(
fn: (repo: PostgresRepositoryWriterInTransaction) => Promise<void>,
options: { timeout?: number; maxWait?: number },
): Promise<void> {
Expand All @@ -352,4 +352,3 @@ export class PostgresRepositoryWriter extends PostgresRepositoryWriterInTransact
);
}
}

2 changes: 1 addition & 1 deletion src/utils/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function runRecurringJob({
}
}

async function sleep(durationInMs: number): Promise<unknown> {
function sleep(durationInMs: number): Promise<unknown> {
return new Promise((resolve) => {
setTimeout(() => {
resolve({ error: false, message: `Slept for ${durationInMs} ms` });
Expand Down
10 changes: 5 additions & 5 deletions src/utils/lucid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ import { NetworkId } from "../types/network";
* @param address Your own address
* @returns
*/
export async function getBackendBlockfrostLucidInstance(
export function getBackendBlockfrostLucidInstance(
networkId: NetworkId,
projectId: string,
blockfrostUrl: string,
address: string,
): Promise<Lucid> {
): Lucid {
const provider = new Blockfrost(blockfrostUrl, projectId);
const lucid = new Lucid({
provider: provider,
network: networkId === NetworkId.MAINNET ? 'Mainnet' : 'Preprod',
network: networkId === NetworkId.MAINNET ? "Mainnet" : "Preprod",
});
lucid.selectReadOnlyWallet({
address: address,
Expand All @@ -39,11 +39,11 @@ export async function getBackendBlockfrostLucidInstance(
* @param address Your own address
* @returns
*/
export async function getBackendMaestroLucidInstance(
export function getBackendMaestroLucidInstance(
network: MaestroSupportedNetworks,
apiKey: string,
address: string,
): Promise<Lucid> {
): Lucid {
const provider = new Maestro({
network: network,
apiKey: apiKey,
Expand Down
Loading