-
Notifications
You must be signed in to change notification settings - Fork 63
Enhanced Redeem #990
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
Open
barvhaim
wants to merge
13
commits into
main
Choose a base branch
from
f-890
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Enhanced Redeem #990
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6c90c17
fabtoken redeem flow
barvhaim 88ab4df
fabtoken redeem flow
barvhaim dd12c63
fabtoken redeem flow
barvhaim 2019fef
zkat redeem flow
barvhaim 7008058
goimports check pass
barvhaim 5f74708
random action for test should include empty extra signers list
aaadir c735ebe
redeem unit-test
barvhaim 5c6242b
fabtoken pp: check at least one issuer
adecaro 96bd632
fabtoken redeem flow
aaadir fac0bbd
fabtoken redeem flow
aaadir d6f67a1
fabtoken redeem flow
aaadir 8b00c51
fabtoken redeem flow
aaadir 83528ac
fabtoken redeem flow
aaadir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
Copyright IBM Corp. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package views | ||
|
||
import ( | ||
"encoding/json" | ||
|
||
view2 "github.com/hyperledger-labs/fabric-smart-client/platform/view" | ||
"github.com/hyperledger-labs/fabric-smart-client/platform/view/services/assert" | ||
"github.com/hyperledger-labs/fabric-smart-client/platform/view/view" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
type Binding struct { | ||
FSCNodeIdentity view.Identity | ||
Alias view.Identity | ||
} | ||
|
||
type SetBindingView struct { | ||
*Binding | ||
} | ||
|
||
func (s *SetBindingView) Call(context view.Context) (interface{}, error) { | ||
es := view2.GetEndpointService(context) | ||
if err := es.Bind(s.FSCNodeIdentity, s.Alias); err != nil { | ||
return nil, errors.Wrap(err, `failed to bind fsc node identity`) | ||
} | ||
return nil, nil | ||
} | ||
|
||
type SetBindingViewFactory struct{} | ||
|
||
func (p *SetBindingViewFactory) NewView(in []byte) (view.View, error) { | ||
f := &SetBindingView{Binding: &Binding{}} | ||
err := json.Unmarshal(in, f.Binding) | ||
assert.NoError(err, "failed unmarshalling input") | ||
|
||
return f, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can it be possible that there is more than one issuer? If so, how do we know which one we have to pick?
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.
We assumed that it is enough for a single issuer to sign and if there are multiple we take the first. It's about the definition of the flow #890
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.
Ok I don't know about that, maybe @KElkhiyaoui or @adecaro can confirm :)
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.
good catch, Arne, we will need to fix this in coming PRs to let the user decide which issuer to choose.