Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some typos in comment #864

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/common/pixkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const formatPixKey = (pixkey: string): [boolean, string] => {
return [true, pixkey]
}

// formated cnpj
// formatted cnpj
if (pixkey.length === 18) {
if (!/^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$/.test(pixkey)) {
return [false, 'invalid pixkey']
Expand All @@ -55,16 +55,16 @@ export const formatPixKey = (pixkey: string): [boolean, string] => {
return [false, 'invalid pixkey']
}

// cnpj or formated cpf
// cnpj or formatted cpf
if (pixkey.length === 14) {
// unformated cnpj
// unformatted cnpj
if (/^\d+$/.test(pixkey)) {
if (!isCnpj(pixkey)) {
return [false, 'invalid pixkey']
}
return [true, pixkey]
}
// formated cpf
// formatted cpf
if (/^\d{3}\.\d{3}\.\d{3}-\d{2}$/.test(pixkey)) {
if (!isCpf(pixkey)) {
return [false, 'invalid cpf']
Expand All @@ -73,7 +73,7 @@ export const formatPixKey = (pixkey: string): [boolean, string] => {
}
}

// informated cpf or phone without country
// informatted cpf or phone without country
if (pixkey.length === 11) {
if (!/^\d+$/.test(pixkey)) {
return [false, 'invalid pixkey']
Expand All @@ -87,7 +87,7 @@ export const formatPixKey = (pixkey: string): [boolean, string] => {
return [true, '+55' + pixkey]
}

// eigher wrong formated cpf or formated phone number
// eigher wrong formatted cpf or formatted phone number
pixkey = pixkey.replace(/[^\d]+/g, '')
if (pixkey.length === 12) {
if (pixkey.charAt(0) !== '0') {
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/info/filecoinFevmCalibrationInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { evmCustomFeeTemplate, evmMemoOptions } from './ethereumCommonInfo'
const builtinTokens: EdgeTokenMap = {
'8c97f94b2cdbf7dc0098057334d9908c4dc0a885': {
currencyCode: 'iFIL',
displayName: 'iFIL Inifinity Pool',
displayName: 'iFIL Infinity Pool',
denominations: [{ name: 'iFIL', multiplier: '1000000000000000000' }],
networkLocation: {
contractAddress: '0x8c97F94b2cDbF7Dc0098057334d9908C4dC0a885'
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/info/filecoinFevmInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { evmCustomFeeTemplate, evmMemoOptions } from './ethereumCommonInfo'
const builtinTokens: EdgeTokenMap = {
'690908f7fa93afc040cfbd9fe1ddd2c2668aa0e0': {
currencyCode: 'iFIL',
displayName: 'iFIL Inifinity Pool',
displayName: 'iFIL Infinity Pool',
denominations: [{ name: 'iFIL', multiplier: '1000000000000000000' }],
networkLocation: {
contractAddress: '0x690908f7fa93afC040CFbD9fE1dDd2C2668Aa0e0'
Expand Down