diff --git a/hasura/migrations/1615534737144_lowercase_player_ethereum_address/up.sql b/hasura/migrations/1615534737144_lowercase_player_ethereum_address/up.sql deleted file mode 100644 index c4927652..00000000 --- a/hasura/migrations/1615534737144_lowercase_player_ethereum_address/up.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE player SET ethereum_address=lower(ethereum_address) WHERE ethereum_address IS NOT NULL; diff --git a/hasura/migrations/1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid/down.sql b/hasura/migrations/1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid/down.sql deleted file mode 100644 index 1cfb1c26..00000000 --- a/hasura/migrations/1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid/down.sql +++ /dev/null @@ -1 +0,0 @@ -alter table "public"."player" drop constraint "ethereum_address_is_valid"; diff --git a/hasura/migrations/1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid/up.sql b/hasura/migrations/1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid/up.sql deleted file mode 100644 index 05881be4..00000000 --- a/hasura/migrations/1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid/up.sql +++ /dev/null @@ -1 +0,0 @@ -alter table "public"."player" add constraint "ethereum_address_is_valid" check (ethereum_address ~* '^0x([a-z0-9-]{40})$'::text); diff --git a/packages/backend/src/handlers/actions/migrateSourceCredAccounts/handler.ts b/packages/backend/src/handlers/actions/migrateSourceCredAccounts/handler.ts index 894fd41d..2754e8f5 100644 --- a/packages/backend/src/handlers/actions/migrateSourceCredAccounts/handler.ts +++ b/packages/backend/src/handlers/actions/migrateSourceCredAccounts/handler.ts @@ -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, diff --git a/packages/backend/src/handlers/auth-webhook/users.ts b/packages/backend/src/handlers/auth-webhook/users.ts index b35a72fd..4eefa189 100644 --- a/packages/backend/src/handlers/auth-webhook/users.ts +++ b/packages/backend/src/handlers/auth-webhook/users.ts @@ -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, });