Page MenuHomePhabricator

[Cashtab] Patch proptypes issues
ClosedPublic

Authored by bytesofman on Apr 3 2024, 11:51.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC4c8fa0a6a075: [Cashtab] Patch proptypes issues
Summary

Patch proptypes errors

  • SendToken initially passes '' to decimals, so accept this in proptypes
  • the max prop is a number for the cashtab msg field, and it works fine, so update proptypes to accept this
  • undefined is not a proptype, if a proptype is not isRequired, then the component accepts undefined implicitly
Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

stop using oneoftype for cached token info

bytesofman published this revision for review.Apr 3 2024, 12:03
emack requested changes to this revision.Apr 4 2024, 04:38
emack added a subscriber: emack.

TokenListItem isn't liking this

image.png (643×361 px, 87 KB)

This revision now requires changes to proceed.Apr 4 2024, 04:38

TokenListItem isn't liking this

image.png (643×361 px, 87 KB)

I actually have this too but it's because we are both early testers

chronik-client was patched to return a string for this field while I was working on this diff

Currently, cashtab does not consider a timeFirstSeen of 'string' in the cache to be invalid, so it does not migrate the cache.

I don't think we should change proptypes to support string or num,, since it should always be num. it's expected behavior for us to see this error log.

Will clear up when I upgrade cashtab cache and we migrate again. At the moment, it's fine if this value is string, since we only use the block stamp anyway for confirmed tokens, and all new tokens will only return number from chronik-client.

This revision is now accepted and ready to land.Apr 4 2024, 05:37
This revision was automatically updated to reflect the committed changes.