[HOLD for payment 2021-09-27] IOU - Modal is shifted to the left when entering a long amount number
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Navigate to NewDot
- Click on request money
- Enter an amount of over 15 numbers
Expected Result:
Modal should stay on the visible area of the screen
Actual Result:
Modal is shifted to the left and button is not completely visible.
Workaround:
N/A
Platform:
Where is this issue confirmed?
- Web
Version Number: 1.0.94-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
From @akshayasalvi https://expensify.slack.com/archives/C01GTK53T8Q/p1630779418448200
When I enter the 15 to 20 digits long amount in Request Money it goes out of the screen (amount is cut). Also, the button aligned is misplaced. Screenshot attached in the thread.
Triggered auto assignment to @bondydaa (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Proposed Solution
If we know that we're going to have a max value for the amount then we should add a maxLength property to the amount field. I added 14 and it worked fine. Then basically it didn't messed up the alignment of the the button as well.
<TextInputAutoWidth
inputStyle={styles.iouAmountTextInput}
...
...
...
value={this.state.amount}
maxLength={14}
/>
15 digits would be 900 billion max, currently the richest person in the world is Jeff Bezos with an estimated 177 billion and while I do hope we eventually have Mr Bezos using expensify to settle up his IOUs I don't think 15-20 digit numbers are going to be super common use case here so I think I agree we should just add a maxLength attribute here and be done with it.
Triggered auto assignment to @stephanieelliott (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
i don't think this needs to be a daily so once the job is created we could move this to weekly or monthly.
Maybe countries with high inflations might be affected by this, e.g Venezuela, currently 1$ is equal to 4.200.000 Bs. So having an IOU of 1000$ would be 4.200.000.000 Bs. It still doesn't reach the 14 digit mark so I agree with Bondy that this will not be a common issue.
Yeah that crossed my mind too but for the time being I believe IOUs can only be in USD. Though something might have changed there that I might have missed so if we think it might be more common then maybe style changes are needed.
On Tue, Sep 7, 2021 at 11:39 AM Isabella Goicoechea < @.***> wrote:
Maybe countries with high inflations might be affected by this, e.g Venezuela, currently 1$ is equal to 4.200.000 Bs. So having an IOU of 1000$ would be 4.200.000.000 Bs. It still doesn't reach the 14 digit mark so I agree with Bondy that this will not be a common issue.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Expensify/App/issues/5115#issuecomment-914496907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7CPCWA6WY7EUESXSY37JTUAZE6NANCNFSM5DRH7AJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Yeah that crossed my mind too but for the time being I believe IOUs can only be in USD
That's not correct. At the moment IOUs can be in any currency available in the currency list.

Considering that the issue is uncommon, I suggested the maxLength fix rather than the style change in the IOUModal and related child components.
Triggered auto assignment to @deetergp (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Posted to Upwork here: https://www.upwork.com/jobs/~013d0ec60b16212278
@deetergp looks like we have a proposal in this comment.
I agree that we can kick the can down the street on 15+ digit numbers for the time being. Let's go with @akshayasalvi proposal of just adding a max length of 14 digits.
:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.
Hey @akshayasalvi can you please propose to the job post in Upwork so I can hire and pay you for this: https://www.upwork.com/jobs/~013d0ec60b16212278
@stephanieelliott Done. Thanks for the help.
π Deployed to staging by @marcaaron in version: 1.0.97-1 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | success β |
| πΈ web πΈ | success β |
π Deployed to production by @francoisl in version: 1.0.98-1 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | success β |
| πΈ web πΈ | success β |
π Deployed to production by @francoisl in version: 1.0.98-1 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | success β |
| πΈ web πΈ | success β |
π Deployed to staging by @francoisl in version: 1.0.98-2 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | success β |
| πΈ web πΈ | success β |
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.0.98-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pulls/5192\n- https://github.com/Expensify/App/pulls/5243\n
If no regressions arise, payment will be issued on 2021-09-27. :confetti_ball: