Skip to content

Commit

Permalink
feat: neartest wallet case
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 4, 2023
1 parent afde3db commit 8e1182a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {

rules: {
// disabled or modified because too strict
'no-nested-ternary': 'off',
'no-restricted-globals': 'warn',
'no-console': ['warn', { allow: ['info', 'error'] }],
'import/prefer-default-export': 'off',
Expand Down
4 changes: 3 additions & 1 deletion server/infra/database/GisRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export default class GisRepository {
active = true
${
params.wallet_id
? `and (wallet.token.wallet_id::text = '${params.wallet_id}' or wallet.wallet.name = '${params.wallet_id}')`
? /[0-9a-f-]{36}/.test(params.wallet_id)
? `and wallet.token.wallet_id = '${params.wallet_id}' `
: `and wallet.wallet.name = '${params.wallet_id}'`
: ''
}
${params.planter_id ? `and planter_id = ${params.planter_id}` : ''}
Expand Down

0 comments on commit 8e1182a

Please sign in to comment.