Skip to content

Commit

Permalink
Merge pull request #329 from dadiorchen/issue328
Browse files Browse the repository at this point in the history
feat: neartest wallet case
  • Loading branch information
dadiorchen committed Jun 4, 2023
2 parents f97f53e + 8e1182a commit cde628f
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 cde628f

Please sign in to comment.