Skip to content

Commit 2cdd6f9

Browse files
authored
Add wallet list detection, scripts to make release builds (#123)
- Add esbuild configuration so backend can be packed for deployment - Minify middleware and add scripts to pack it properly for deployment - Tweak Hardhat configs to be able to test emulated blocks - Serve list of detected EVM wallets to frontend See PaimaStudios/paima-engine#439
1 parent 2460fa7 commit 2cdd6f9

27 files changed

+587
-526
lines changed

.env.devnet

Lines changed: 0 additions & 43 deletions
This file was deleted.

.env.mainnet

Lines changed: 0 additions & 37 deletions
This file was deleted.

api/src/controllers/allConfigs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class userConfigsController extends Controller {
1313
@Get()
1414
public async get(@Query() creator: string): Promise<UserConfigsResponse> {
1515
const pool = requirePool();
16-
creator = (await getMainAddress(creator, pool)).address;
16+
//creator = (await getMainAddress(creator, pool)).address;
1717
const configs = await getUserConfigs.run({ creator }, pool);
1818
return { configs };
1919
}

api/src/controllers/openLobbies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class openLobbiesController extends Controller {
2929
throw new ValidateError({ count: { message: 'invalid number' } }, '');
3030
}
3131

32-
wallet = (await getMainAddress(wallet, pool)).address;
32+
//wallet = (await getMainAddress(wallet, pool)).address;
3333
const p = valPage.right;
3434
const c = valCount.right;
3535
const offset = (p - 1) * c;

api/src/controllers/searchOpenLobbies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class SearchOpenLobbiesController extends Controller {
2626
if (searchQuery.length < MIN_SEARCH_LENGTH || searchQuery.length > LOBBY_ID_LENGTH)
2727
return emptyResponse;
2828

29-
wallet = (await getMainAddress(wallet, pool)).address;
29+
//wallet = (await getMainAddress(wallet, pool)).address;
3030

3131
if (searchQuery.length == LOBBY_ID_LENGTH) {
3232
const lobbies = await getOpenLobbyById.run({ searchQuery, wallet }, pool);

api/src/controllers/userFinishedLobbies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class UserFinishedLobbiesController extends Controller {
3030
}
3131

3232
// after typecheck, valid data output is given in .right
33-
wallet = (await getMainAddress(wallet, pool)).address;
33+
//wallet = (await getMainAddress(wallet, pool)).address;
3434
const p = valPage.right;
3535
const c = valCount.right;
3636
const offset = (p - 1) * c;

api/src/controllers/userLobbies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class UserLobbiesController extends Controller {
3535
}
3636

3737
// after typecheck, valid data output is given in .right
38-
wallet = (await getMainAddress(wallet, pool)).address;
38+
//wallet = (await getMainAddress(wallet, pool)).address;
3939
const p = valPage.right;
4040
const c = valCount.right;
4141
const offset = (p - 1) * c;

api/src/controllers/userLobbiesBlockheight.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class UserLobbiesBlockheightController extends Controller {
1414
@Get()
1515
public async get(@Query() wallet: string, @Query() blockHeight: number): Promise<UserLobbiesBlockheightResponse> {
1616
const pool = requirePool();
17-
wallet = (await getMainAddress(wallet, pool)).address;
17+
//wallet = (await getMainAddress(wallet, pool)).address;
1818
const valBH = psqlNum.decode(blockHeight);
1919
if (isLeft(valBH)) {
2020
throw new ValidateError({ blockHeight: { message: 'invalid number' } }, '');

api/src/controllers/userNFT.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class userNFTController extends Controller {
1212
@Get()
1313
public async get(@Query() wallet: string): Promise<UserNftResponse> {
1414
const pool = requirePool();
15-
wallet = (await getMainAddress(wallet, pool)).address;
15+
//wallet = (await getMainAddress(wallet, pool)).address;
1616
const [nft] = await getLatestUserNft.run({ wallet }, pool);
1717
return { nft };
1818
}

api/src/controllers/userStats.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class userStatsController extends Controller {
1212
@Get()
1313
public async get(@Query() wallet: string): Promise<UserStatsResponse> {
1414
const pool = requirePool();
15-
wallet = (await getMainAddress(wallet, pool)).address;
15+
//wallet = (await getMainAddress(wallet, pool)).address;
1616
const [stats] = await getUserStats.run({ wallet }, pool);
1717
return { stats };
1818
}

0 commit comments

Comments
 (0)