Skip to content

Commit

Permalink
refactor: Use ao available modules
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanpaudel93 committed Jul 7, 2024
1 parent 9405044 commit a43ae13
Show file tree
Hide file tree
Showing 12 changed files with 390 additions and 2,513 deletions.
6 changes: 1 addition & 5 deletions src/helpers/downloadAosProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,11 @@ export async function downloadAosProcess(projectDir: string) {
}
}

// Copy json.lua
const jsonFileDst = path.join(destinationDir, "json.lua");
const jsonFileSrc = path.join(projectDir, "src", "libs", "json", "json.lua");
await fse.copy(jsonFileSrc, jsonFileDst);

// Copy everything inside testing Directory
const testingDir = path.join(projectDir, "src", "libs", "testing");
await fse.copy(testingDir, destinationDir);
await fse.remove(testingDir);

return true;
} catch (error: any) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion template/ao/src/handlers/balance.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local json = require "src.libs.json.mod"
local json = require "json"

local mod = {}

Expand Down
2 changes: 1 addition & 1 deletion template/ao/src/handlers/burn.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local bint = require "src.libs.bint.mod" (256)
local bint = require('.bint')(256)
local utils = require "src.utils.mod"

local mod = {}
Expand Down
2 changes: 1 addition & 1 deletion template/ao/src/handlers/mint.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local bint = require "src.libs.bint.mod" (256)
local bint = require('.bint')(256)
local utils = require "src.utils.mod"

local mod = {}
Expand Down
2 changes: 1 addition & 1 deletion template/ao/src/handlers/transfer.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local bint = require "src.libs.bint.mod" (256)
local bint = require('.bint')(256)
local utils = require "src.utils.mod"

local mod = {}
Expand Down
Loading

0 comments on commit a43ae13

Please sign in to comment.