dev-api-aliases #5
			No reviewers
			
		
		
		
	
	
	
		Labels
		
	
	
	
	
		No Label
		
		
			
	
	
	Compat/Breaking
		
			Kind/Bug
		
			Kind/Documentation
		
			Kind/Enhancement
		
			Kind/Feature
		
			Kind/Security
		
			Kind/Testing
		
			Priority
Critical
		
			Priority
High
		
			Priority
Low
		
			Priority
Medium
		
			Reviewed
Confirmed
		
			Reviewed
Duplicate
		
			Reviewed
Invalid
		
			Reviewed
Won't Fix
		
			Status
Abandoned
		
			Status
Blocked
		
			Status
Need More Info
		
	
		No Milestone
		
			
		
	
	
		
		
		
			No project
			
				
			
		
	
	
	
	
	
		No Assignees
		
			
		
	
	
	
		2 Participants
		
	
	
		
		
			Notifications
			
				
			
		
	
	
		
		
	
	
	Due Date
	No due date set.
			
				Dependencies
				
				
		
	
	
	No dependencies set.
			Reference: grassrootseconomics/sarafu-api#5
			
		
	
		Loading…
	
		Reference in New Issue
	
	Block a user
	
	No description provided.
		
		Delete Branch "dev-api-aliases"
	
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR Change:
Persists account aliases for the local dev api.
Implements RequestAlias for the HTTPAccountService
@ -26,2 +26,3 @@logg = logging.NewVanilla().WithDomain("sarafu-api.devapi")logg = logging.NewVanilla().WithDomain("sarafu-api.devapi")aliasRegex = regexp.MustCompile("^\\+?[a-zA-Z0-9\\-_]+$")searchDomain = ".sarafu.local"Export please
@lash Should be moved to: https://git.grassecon.net/grassrootseconomics/common?
no its fine here, it's for dev only anyway.
@ -108,0 +105,4 @@defaultAccount stringemitterFunc event.EmitterFuncpfx []byte// accountsSession map[string]stringremove commentedp lease
@ -329,0 +348,4 @@if err != nil {return err}das.db.SetSession("")This is probably not correct? Alias is bound to a session, right?
Yeah that's right.Resolved by:
ed549cba70@ -408,1 +432,3 @@Balance: strconv.Itoa(v),TokenSymbol: voucher.Symbol,TokenDecimals: strconv.Itoa(voucher.Decimals),Balance: strconv.Itoa(500),Why hardcoded number?
@ -19,1 +20,4 @@var (aliasRegex = regexp.MustCompile("^\\+?[a-zA-Z0-9\\-_]+$")searchDomain = ".sarafu.eth"THe searchdomain should not be necessary here
@ -221,3 +227,4 @@}// TODO: Use actual custodial api to request available aliasfunc (as *HTTPAccountService) RequestAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error) {Can't we just point this to devapi.RequestAlias?
@lash Nice catch.Actually that brings up an idea,could we use the same implementation of the devapi to resolve the alias' address given that the api always returns the same address?
yes for sure, while we wait or the api implementation.