mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-24 05:37:56 -05:00
Revert ethereum address lowercase (#407)
* Revert "add if not null check to ethereum address (#406)" This reverts commitc6364bd4f6. * Revert "make ethereum_address lowercase in backend (#405)" This reverts commit3cee60e30d.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
UPDATE player SET ethereum_address=lower(ethereum_address) WHERE ethereum_address IS NOT NULL;
|
||||
@@ -1 +0,0 @@
|
||||
alter table "public"."player" drop constraint "ethereum_address_is_valid";
|
||||
@@ -1 +0,0 @@
|
||||
alter table "public"."player" add constraint "ethereum_address_is_valid" check (ethereum_address ~* '^0x([a-z0-9-]{40})$'::text);
|
||||
@@ -108,7 +108,7 @@ export const migrateSourceCredAccounts = async (
|
||||
|
||||
const rank = computeRank(index);
|
||||
return {
|
||||
ethereum_address: addressEntry && addressEntry.address.toLowerCase(),
|
||||
ethereum_address: addressEntry && addressEntry.address,
|
||||
scIdentityId: a.account.identity.id,
|
||||
username: a.account.identity.name.toLowerCase(),
|
||||
totalXp: a.totalCred,
|
||||
|
||||
@@ -11,8 +11,7 @@ async function createPlayer(ethAddress: string) {
|
||||
return resProfile.insert_player.returning[0];
|
||||
}
|
||||
|
||||
export async function getOrCreatePlayer(ethereumAddress: string) {
|
||||
const ethAddress = ethereumAddress.toLowerCase();
|
||||
export async function getOrCreatePlayer(ethAddress: string) {
|
||||
const res = await client.GetPlayerFromETH({
|
||||
ethereum_address: ethAddress,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user