Skip to content

Commit

Permalink
Merge pull request #16 from hypha-dao/develop
Browse files Browse the repository at this point in the history
Develop - merge of the new release to master
  • Loading branch information
mgravitt authored Feb 18, 2021
2 parents e6ee998 + 33fe07c commit efafded
Show file tree
Hide file tree
Showing 16 changed files with 282 additions and 2,291 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ eosc-vault.json
**/*_project-prefix*
**/test_results
dao-go/nodeos.log
dao-go/testlog.txt
dao-go/testlog.txt
main.go
main1.go
*.json
dao-contracts
migration.sh
37 changes: 0 additions & 37 deletions dao-go/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,34 +129,6 @@ func AddPeriods(ctx context.Context, api *eos.API, daoContract eos.AccountName,
return periods, nil
}

// // Period represents a period of time aligning to a payroll period, typically a week
// type Period struct {
// PeriodID uint64 `json:"period_id"`
// StartTime eos.BlockTimestamp `json:"start_time"`
// EndTime eos.BlockTimestamp `json:"end_time"`
// Phase string `json:"phase"`
// }

// LoadPeriods loads the period data from the blockchain
func LoadPeriods(api *eos.API, includePast, includeFuture bool) ([]Period, error) {

var periods []Period
var periodRequest eos.GetTableRowsRequest
periodRequest.Code = "dao.hypha"
periodRequest.Scope = "dao.hypha"
periodRequest.Table = "periods"
periodRequest.Limit = 1000
periodRequest.JSON = true

periodResponse, err := api.GetTableRows(context.Background(), periodRequest)
if err != nil {
return []Period{}, fmt.Errorf("cannot load periods %v", err)
}

periodResponse.JSONToStructs(&periods)
return periods, nil
}

type applyParm struct {
Applicant eos.AccountName
Notes string
Expand Down Expand Up @@ -246,15 +218,6 @@ func ClaimPay(ctx context.Context, api *eos.API, contract, claimer eos.AccountNa
return eostest.ExecTrx(ctx, api, actions)
}

// type AssignmentPay struct {
// ID uint64 `json:"ass_payment_id"`
// AssignmentID uint64 `json:"assignment_id"`
// PeriodID uint64 `json:"period_id"`
// Recipient eos.Name `json:"recipient"`
// Payments []eos.Asset `json:"payments"`
// PaymentDate eos.BlockTimestamp `json:"payment_date"`
// }

type balance struct {
Balance eos.Asset `json:"balance"`
}
Expand Down
158 changes: 0 additions & 158 deletions dao-go/migration.go

This file was deleted.

Loading

0 comments on commit efafded

Please sign in to comment.