-
Notifications
You must be signed in to change notification settings - Fork 54
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
Fix/wallet upgrades #175
base: master
Are you sure you want to change the base?
Fix/wallet upgrades #175
Conversation
@@ -414,7 +414,7 @@ class Wallet{ | |||
if( | |||
trustRelationship.actor_wallet_id === senderWallet.getId() && | |||
trustRelationship.target_wallet_id === receiveWallet.getId() && | |||
trustRelationship.request_type === TrustRelationship.ENTITY_TRUST_REQUEST_TYPE.send | |||
trustRelationship.request_type === trustType |
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.
This hasTrust method in wallet model was not actually referencing the trustType parameter sent in, so I changed it to be more flexible to reuse for checking other request types
@@ -274,9 +274,9 @@ describe("Wallet", () => { | |||
target_wallet_id: wallet.getId(), | |||
}]); | |||
const result = await wallet.hasTrust( | |||
TrustRelationship.ENTITY_TRUST_TYPE.send, | |||
wallet, | |||
TrustRelationship.ENTITY_TRUST_REQUEST_TYPE.receive, |
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.
As a result of my change on hasTrust method referencing the trust type parameter now, I also think this test should expect a "receive" request type (should not be sending an entity trust type). Since wallet2 (actor, receiver) is sending a receive request to wallet (target, sender).
@mzyau I think we also need to mock this |
@dadiorchen Can you fix this for @mzyau as an example? |
No description provided.