-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Transfer becomes TransferCoin in typescript type check #1923
Conversation
recipient: string; | ||
object_ref: RawObjectRef; | ||
}; | ||
export type RawAuthoritySignInfo = [AuthorityName, AuthoritySignature]; | ||
|
||
export type TransactionKindName = 'Transfer' | 'Publish' | 'Call'; | ||
export type TransactionKindName = 'Transfer' | 'TransferCoin' | 'Publish' | 'Call'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export type TransactionKindName = 'Transfer' | 'TransferCoin' | 'Publish' | 'Call'; | |
export type TransactionKindName = 'TransferCoin' | 'Publish' | 'Call'; |
I would rather keep this in sync with the backend schema, rather than worrying about backward compatibility since this makes the codebase very messy. We will have a devnet release today, so the devnet gateway server should also return TransferCoin
soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would too, but i fear that may break the existing deployment - when we redeploy, will that remove all old objects ?
| { TransferCoin: TransferCoin } | ||
| { Transfer: TransferCoin } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { TransferCoin: TransferCoin } | |
| { Transfer: TransferCoin } | |
| { TransferCoin: TransferCoin } |
const tx = getSingleTransactionKind(data); | ||
return tx && 'Transfer' in tx ? tx.Transfer : undefined; | ||
if (!tx) return undefined; | ||
if ('Transfer' in tx) return tx.Transfer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ('Transfer' in tx) return tx.Transfer; |
removed backwards compat |
let's fix the lint complaints and I will cherry pick this into devnet release |
not sure why the e2e tests are failing when nothing in the UI has changed... |
the PR does not change the layout: this is caused by pointing the new frontend at the old data model. |
This reverts commit ae32d2f.
Explorer frontend broke because of this name change, this adds more flexibility to the type check.
To test,
npm start
the explorer and navigate to:http://localhost:3000/transactions/NoDwmf3WZfUfjLugQwQ7FHq%2F6KgawS9935zND%2FhA3as%3D/?rpc=http%3A%2F%2Fade208279c6c444e5bf8b852fca5411d-1692910544.us-west-2.elb.amazonaws.com%3A9000%2F
this was previously broken.
This was also causing issues with only showing a few recent transactions on the home page, which should show 15 again.
http://localhost:3000/?rpc=http%3A%2F%2Fade208279c6c444e5bf8b852fca5411d-1692910544.us-west-2.elb.amazonaws.com%3A9000%2F